[llvm] r241016 - bcanalyzer: Rewrite all the METADATA_ codes
Duncan P. N. Exon Smith
dexonsmith at apple.com
Mon Jun 29 15:50:35 PDT 2015
Author: dexonsmith
Date: Mon Jun 29 17:50:35 2015
New Revision: 241016
URL: http://llvm.org/viewvc/llvm-project?rev=241016&view=rev
Log:
bcanalyzer: Rewrite all the METADATA_ codes
Add all the new `Metadata` codes since LLVM 3.6, and at the same time
follow the precedent set in other blocks by removing the `METADATA_`
prefix from the string output.
Modified:
llvm/trunk/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
Modified: llvm/trunk/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp?rev=241016&r1=241015&r2=241016&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp (original)
+++ llvm/trunk/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp Mon Jun 29 17:50:35 2015
@@ -264,19 +264,41 @@ static const char *GetCodeName(unsigned
case bitc::METADATA_ATTACHMENT_ID:
switch(CodeID) {
default:return nullptr;
- case bitc::METADATA_ATTACHMENT: return "METADATA_ATTACHMENT";
+ STRINGIFY_CODE(METADATA, ATTACHMENT)
}
case bitc::METADATA_BLOCK_ID:
switch(CodeID) {
default:return nullptr;
- case bitc::METADATA_STRING: return "METADATA_STRING";
- case bitc::METADATA_NAME: return "METADATA_NAME";
- case bitc::METADATA_KIND: return "METADATA_KIND";
- case bitc::METADATA_NODE: return "METADATA_NODE";
- case bitc::METADATA_VALUE: return "METADATA_VALUE";
- case bitc::METADATA_OLD_NODE: return "METADATA_OLD_NODE";
- case bitc::METADATA_OLD_FN_NODE: return "METADATA_OLD_FN_NODE";
- case bitc::METADATA_NAMED_NODE: return "METADATA_NAMED_NODE";
+ STRINGIFY_CODE(METADATA, STRING)
+ STRINGIFY_CODE(METADATA, NAME)
+ STRINGIFY_CODE(METADATA, KIND)
+ STRINGIFY_CODE(METADATA, NODE)
+ STRINGIFY_CODE(METADATA, VALUE)
+ STRINGIFY_CODE(METADATA, OLD_NODE)
+ STRINGIFY_CODE(METADATA, OLD_FN_NODE)
+ STRINGIFY_CODE(METADATA, NAMED_NODE)
+ STRINGIFY_CODE(METADATA, DISTINCT_NODE)
+ STRINGIFY_CODE(METADATA, LOCATION)
+ STRINGIFY_CODE(METADATA, GENERIC_DEBUG)
+ STRINGIFY_CODE(METADATA, SUBRANGE)
+ STRINGIFY_CODE(METADATA, ENUMERATOR)
+ STRINGIFY_CODE(METADATA, BASIC_TYPE)
+ STRINGIFY_CODE(METADATA, FILE)
+ STRINGIFY_CODE(METADATA, DERIVED_TYPE)
+ STRINGIFY_CODE(METADATA, COMPOSITE_TYPE)
+ STRINGIFY_CODE(METADATA, SUBROUTINE_TYPE)
+ STRINGIFY_CODE(METADATA, COMPILE_UNIT)
+ STRINGIFY_CODE(METADATA, SUBPROGRAM)
+ STRINGIFY_CODE(METADATA, LEXICAL_BLOCK)
+ STRINGIFY_CODE(METADATA, LEXICAL_BLOCK_FILE)
+ STRINGIFY_CODE(METADATA, NAMESPACE)
+ STRINGIFY_CODE(METADATA, TEMPLATE_TYPE)
+ STRINGIFY_CODE(METADATA, TEMPLATE_VALUE)
+ STRINGIFY_CODE(METADATA, GLOBAL_VAR)
+ STRINGIFY_CODE(METADATA, LOCAL_VAR)
+ STRINGIFY_CODE(METADATA, EXPRESSION)
+ STRINGIFY_CODE(METADATA, OBJC_PROPERTY)
+ STRINGIFY_CODE(METADATA, IMPORTED_ENTITY)
}
case bitc::USELIST_BLOCK_ID:
switch(CodeID) {
More information about the llvm-commits
mailing list