about summary refs log tree commit diff
path: root/llvm_mode/split-switches-pass.so.cc
diff options
context:
space:
mode:
Diffstat (limited to 'llvm_mode/split-switches-pass.so.cc')
-rw-r--r--llvm_mode/split-switches-pass.so.cc12
1 files changed, 2 insertions, 10 deletions
diff --git a/llvm_mode/split-switches-pass.so.cc b/llvm_mode/split-switches-pass.so.cc
index 12be8a95..8d4db292 100644
--- a/llvm_mode/split-switches-pass.so.cc
+++ b/llvm_mode/split-switches-pass.so.cc
@@ -45,14 +45,10 @@ namespace {
 
       bool runOnModule(Module &M) override;
 
-#if __clang_major__ >= 4
+#if LLVM_VERSION_MAJOR >= 4
       StringRef getPassName() const override {
 #else
- #ifndef __GNUG__
       const char * getPassName() const override {
- #else
-      StringRef getPassName() const override {
- #endif
 #endif
         return "splits switch constructs";
       }
@@ -258,12 +254,8 @@ bool SplitSwitchesTransform::splitSwitches(Module &M) {
     /* Prepare cases vector. */
     CaseVector Cases;
     for (SwitchInst::CaseIt i = SI->case_begin(), e = SI->case_end(); i != e; ++i)
-#if __clang_major__ < 5
- #ifndef __GNUG__
+#if LLVM_VERSION_MAJOR < 5
       Cases.push_back(CaseExpr(i.getCaseValue(), i.getCaseSuccessor()));
- #else
-      Cases.push_back(CaseExpr(i->getCaseValue(), i->getCaseSuccessor()));
- #endif
 #else
       Cases.push_back(CaseExpr(i->getCaseValue(), i->getCaseSuccessor()));
 #endif