aboutsummaryrefslogtreecommitdiffstats
path: root/tools/llvm-bcanalyzer
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-07-22 17:43:22 +0000
committerDevang Patel <dpatel@apple.com>2009-07-22 17:43:22 +0000
commite54abc90fe9942ef3902040a7ac475ce0c369dc9 (patch)
treec76031cf9bdfac5f7ac7f46d5360b7d8675c12c0 /tools/llvm-bcanalyzer
parentdbe77cfa0bcae10d91fbdbf118a97ec212afc88e (diff)
downloadexternal_llvm-e54abc90fe9942ef3902040a7ac475ce0c369dc9.zip
external_llvm-e54abc90fe9942ef3902040a7ac475ce0c369dc9.tar.gz
external_llvm-e54abc90fe9942ef3902040a7ac475ce0c369dc9.tar.bz2
Introduce MetadataBase, a base class for MDString and MDNode.
Derive MDString directly from MetadataBase. Introduce new bitcode block to hold metadata. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76759 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-bcanalyzer')
-rw-r--r--tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp b/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
index bb39e07..4eaa60c 100644
--- a/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
+++ b/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
@@ -98,6 +98,7 @@ static const char *GetBlockName(unsigned BlockID,
case bitc::FUNCTION_BLOCK_ID: return "FUNCTION_BLOCK";
case bitc::TYPE_SYMTAB_BLOCK_ID: return "TYPE_SYMTAB";
case bitc::VALUE_SYMTAB_BLOCK_ID: return "VALUE_SYMTAB";
+ case bitc::METADATA_BLOCK_ID: return "METADATA_BLOCK";
}
}
@@ -194,7 +195,6 @@ static const char *GetCodeName(unsigned CodeID, unsigned BlockID,
case bitc::CST_CODE_CE_CMP: return "CE_CMP";
case bitc::CST_CODE_INLINEASM: return "INLINEASM";
case bitc::CST_CODE_CE_SHUFVEC_EX: return "CE_SHUFVEC_EX";
- case bitc::CST_CODE_MDSTRING: return "MDSTRING";
case bitc::CST_CODE_MDNODE: return "MDNODE";
}
case bitc::FUNCTION_BLOCK_ID:
@@ -244,6 +244,11 @@ static const char *GetCodeName(unsigned CodeID, unsigned BlockID,
case bitc::VST_CODE_ENTRY: return "ENTRY";
case bitc::VST_CODE_BBENTRY: return "BBENTRY";
}
+ case bitc::METADATA_BLOCK_ID:
+ switch(CodeID) {
+ default:return 0;
+ case bitc::METADATA_STRING: return "MDSTRING";
+ }
}
}