[PATCH] D51647: Fix build failures after rL341386.

Hiroshi Yamauchi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 4 11:14:07 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL341391: Fix build failures after rL341386. (authored by yamauchi, committed by ).

Repository:
  rL LLVM

https://reviews.llvm.org/D51647

Files:
  llvm/trunk/lib/Transforms/Instrumentation/ControlHeightReduction.cpp


Index: llvm/trunk/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
+++ llvm/trunk/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
@@ -34,7 +34,9 @@
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Transforms/Scalar.h"
 
+#if !defined(_MSC_VER)
 #include <cxxabi.h>
+#endif
 #include <set>
 #include <sstream>
 
@@ -446,8 +448,10 @@
       return true;
     const char* DemangledName = nullptr;
     int Status = -1;
+#if !defined(_MSC_VER)
     DemangledName = abi::__cxa_demangle(Name.str().c_str(),
                                         nullptr, nullptr, &Status);
+#endif
     return DemangledName && CHRFunctions.count(DemangledName);
   }
 
@@ -459,8 +463,10 @@
   std::string Name = F.getName().str();
   const char *DemangledName = nullptr;
   int Status = -1;
+#if !defined(_MSC_VER)
   DemangledName = abi::__cxa_demangle(Name.c_str(),
                                       nullptr, nullptr, &Status);
+#endif
   if (DemangledName == nullptr) {
     DemangledName = "<NOT-MANGLED>";
   }
@@ -1593,6 +1599,7 @@
       Value *V = BI->getCondition();
       CHR_DEBUG(dbgs() << *V << "\n");
       if (auto *I = dyn_cast<Instruction>(V)) {
+        (void)(I); // Unused in release build.
         assert((I->getParent() == PreEntryBlock ||
                 !Scope->contains(I)) &&
                "Must have been hoisted to PreEntryBlock or outside the scope");
@@ -1606,6 +1613,7 @@
       Value *V = SI->getCondition();
       CHR_DEBUG(dbgs() << *V << "\n");
       if (auto *I = dyn_cast<Instruction>(V)) {
+        (void)(I); // Unused in release build.
         assert((I->getParent() == PreEntryBlock ||
                 !Scope->contains(I)) &&
                "Must have been hoisted to PreEntryBlock or outside the scope");


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51647.163877.patch
Type: text/x-patch
Size: 1910 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180904/f3d4f947/attachment.bin>


More information about the llvm-commits mailing list