From 4ed72335bd1f103ac0eb79789613b6666e2d0a76 Mon Sep 17 00:00:00 2001 From: Ilia Filippov Date: Mon, 9 Jun 2014 16:35:56 +0400 Subject: [PATCH] support LLVM --- cbackend.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cbackend.cpp b/cbackend.cpp index 51890d7f..3d515a60 100644 --- a/cbackend.cpp +++ b/cbackend.cpp @@ -2163,7 +2163,13 @@ static SpecialGlobalClass getGlobalVariableClass(const llvm::GlobalVariable *GV) // Otherwise, if it is other metadata, don't print it. This catches things // like debug information. +#if defined(LLVM_3_5) + // Here we compare char * + if (!strcmp(GV->getSection(), "llvm.metadata")) +#else + // Here we compare strings if (GV->getSection() == "llvm.metadata") +#endif return NotPrinted; return NotSpecial;