Quotes should be printed before private prefix; some code clean up.
[llvm/msp430.git] / lib / Debugger / SourceLanguage.cpp
blob4fcc38bd3344c8e979f460b6f71fde60249942ea
1 //===-- SourceLanguage.cpp - Implement the SourceLanguage class -----------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file implements the SourceLanguage class.
12 //===----------------------------------------------------------------------===//
14 #include "llvm/Debugger/SourceLanguage.h"
15 #include "llvm/Debugger/ProgramInfo.h"
16 using namespace llvm;
18 const SourceLanguage &SourceLanguage::get(unsigned ID) {
19 switch (ID) {
20 case 1: // DW_LANG_C89
21 case 2: // DW_LANG_C
22 case 12: // DW_LANG_C99
23 return getCFamilyInstance();
25 case 4: // DW_LANG_C_plus_plus
26 return getCPlusPlusInstance();
28 case 3: // DW_LANG_Ada83
29 case 5: // DW_LANG_Cobol74
30 case 6: // DW_LANG_Cobol85
31 case 7: // DW_LANG_Fortran77
32 case 8: // DW_LANG_Fortran90
33 case 9: // DW_LANG_Pascal83
34 case 10: // DW_LANG_Modula2
35 case 11: // DW_LANG_Java
36 case 13: // DW_LANG_Ada95
37 case 14: // DW_LANG_Fortran95
38 default:
39 return getUnknownLanguageInstance();
44 SourceFileInfo *
45 SourceLanguage::createSourceFileInfo(const GlobalVariable *Desc,
46 ProgramInfo &PI) const {
47 return new SourceFileInfo(Desc, *this);
50 SourceFunctionInfo *
51 SourceLanguage::createSourceFunctionInfo(const GlobalVariable *Desc,
52 ProgramInfo &PI) const {
53 return new SourceFunctionInfo(PI, Desc);