llvm.org GIT mirror llvm / 639592d
Add llvm-bcanalyzer support for new metadata node types. Also sort the existing list by value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290901 91177308-0d34-0410-b5e6-96231b3b80d8 Adrian Prantl 2 years ago
2 changed file(s) with 12 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: llvm-dis -o - %s.bc | FileCheck %s
1 ; RUN: llvm-dis -o - %s.bc | llvm-as - | llvm-bcanalyzer -dump - | FileCheck %s --check-prefix=BC
12
3 ; BC: GLOBAL_VAR_EXPR
4 ; BC: GLOBAL_DECL_ATTACHMENT
25 ; CHECK: @g = common global i32 0, align 4, !dbg ![[G:[0-9]+]]
36 ; CHECK: @h = common global i32 0, align 4, !dbg ![[H:[0-9]+]]
47 ; CHECK: ![[G]] = {{.*}}!DIGlobalVariableExpression(var: ![[GVAR:[0-9]+]], expr: ![[GEXPR:[0-9]+]])
321321 switch(CodeID) {
322322 default:return nullptr;
323323 STRINGIFY_CODE(METADATA, STRING_OLD)
324 STRINGIFY_CODE(METADATA, STRINGS)
324 STRINGIFY_CODE(METADATA, VALUE)
325 STRINGIFY_CODE(METADATA, NODE)
325326 STRINGIFY_CODE(METADATA, NAME)
327 STRINGIFY_CODE(METADATA, DISTINCT_NODE)
326328 STRINGIFY_CODE(METADATA, KIND) // Older bitcode has it in a MODULE_BLOCK
327 STRINGIFY_CODE(METADATA, NODE)
328 STRINGIFY_CODE(METADATA, VALUE)
329 STRINGIFY_CODE(METADATA, LOCATION)
329330 STRINGIFY_CODE(METADATA, OLD_NODE)
330331 STRINGIFY_CODE(METADATA, OLD_FN_NODE)
331332 STRINGIFY_CODE(METADATA, NAMED_NODE)
332 STRINGIFY_CODE(METADATA, DISTINCT_NODE)
333 STRINGIFY_CODE(METADATA, LOCATION)
334333 STRINGIFY_CODE(METADATA, GENERIC_DEBUG)
335334 STRINGIFY_CODE(METADATA, SUBRANGE)
336335 STRINGIFY_CODE(METADATA, ENUMERATOR)
352351 STRINGIFY_CODE(METADATA, OBJC_PROPERTY)
353352 STRINGIFY_CODE(METADATA, IMPORTED_ENTITY)
354353 STRINGIFY_CODE(METADATA, MODULE)
354 STRINGIFY_CODE(METADATA, MACRO)
355 STRINGIFY_CODE(METADATA, MACRO_FILE)
356 STRINGIFY_CODE(METADATA, STRINGS)
357 STRINGIFY_CODE(METADATA, GLOBAL_DECL_ATTACHMENT)
358 STRINGIFY_CODE(METADATA, GLOBAL_VAR_EXPR)
355359 STRINGIFY_CODE(METADATA, INDEX_OFFSET)
356360 STRINGIFY_CODE(METADATA, INDEX)
357361 }