diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2013-07-09 22:02:49 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2013-07-09 22:02:49 +0000 |
commit | 405515d55f470d04ef75f653b7f1994329c9066b (patch) | |
tree | 266701dc84b1075bfc75dc966c9af242a378371d /lib | |
parent | 8c5c6f0e090f91b6555cdd9d2eea238fff3befe6 (diff) | |
download | external_llvm-405515d55f470d04ef75f653b7f1994329c9066b.zip external_llvm-405515d55f470d04ef75f653b7f1994329c9066b.tar.gz external_llvm-405515d55f470d04ef75f653b7f1994329c9066b.tar.bz2 |
Rename BlackList class to SpecialCaseList and move it to Transforms/Utils.
Differential Revision: http://llvm-reviews.chandlerc.com/D1089
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185975 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/Instrumentation/AddressSanitizer.cpp | 10 | ||||
-rw-r--r-- | lib/Transforms/Instrumentation/CMakeLists.txt | 1 | ||||
-rw-r--r-- | lib/Transforms/Instrumentation/MemorySanitizer.cpp | 6 | ||||
-rw-r--r-- | lib/Transforms/Instrumentation/ThreadSanitizer.cpp | 6 | ||||
-rw-r--r-- | lib/Transforms/Utils/CMakeLists.txt | 1 | ||||
-rw-r--r-- | lib/Transforms/Utils/SpecialCaseList.cpp (renamed from lib/Transforms/Instrumentation/BlackList.cpp) | 18 |
6 files changed, 21 insertions, 21 deletions
diff --git a/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/lib/Transforms/Instrumentation/AddressSanitizer.cpp index 417fd76..28c5622 100644 --- a/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -43,10 +43,10 @@ #include "llvm/Support/raw_ostream.h" #include "llvm/Support/system_error.h" #include "llvm/Transforms/Utils/BasicBlockUtils.h" -#include "llvm/Transforms/Utils/BlackList.h" #include "llvm/Transforms/Utils/Cloning.h" #include "llvm/Transforms/Utils/Local.h" #include "llvm/Transforms/Utils/ModuleUtils.h" +#include "llvm/Transforms/Utils/SpecialCaseList.h" #include <algorithm> #include <string> @@ -318,7 +318,7 @@ struct AddressSanitizer : public FunctionPass { Function *AsanCtorFunction; Function *AsanInitFunction; Function *AsanHandleNoReturnFunc; - OwningPtr<BlackList> BL; + OwningPtr<SpecialCaseList> BL; // This array is indexed by AccessIsWrite and log2(AccessSize). Function *AsanErrorCallback[2][kNumberOfAccessSizes]; // This array is indexed by AccessIsWrite. @@ -358,7 +358,7 @@ class AddressSanitizerModule : public ModulePass { SmallString<64> BlacklistFile; bool ZeroBaseShadow; - OwningPtr<BlackList> BL; + OwningPtr<SpecialCaseList> BL; SetOfDynamicallyInitializedGlobals DynamicallyInitializedGlobals; Type *IntptrTy; LLVMContext *C; @@ -880,7 +880,7 @@ bool AddressSanitizerModule::runOnModule(Module &M) { TD = getAnalysisIfAvailable<DataLayout>(); if (!TD) return false; - BL.reset(new BlackList(BlacklistFile)); + BL.reset(new SpecialCaseList(BlacklistFile)); if (BL->isIn(M)) return false; C = &(M.getContext()); int LongSize = TD->getPointerSizeInBits(); @@ -1070,7 +1070,7 @@ bool AddressSanitizer::doInitialization(Module &M) { if (!TD) return false; - BL.reset(new BlackList(BlacklistFile)); + BL.reset(new SpecialCaseList(BlacklistFile)); DynamicallyInitializedGlobals.Init(M); C = &(M.getContext()); diff --git a/lib/Transforms/Instrumentation/CMakeLists.txt b/lib/Transforms/Instrumentation/CMakeLists.txt index aa265a4..5e34863 100644 --- a/lib/Transforms/Instrumentation/CMakeLists.txt +++ b/lib/Transforms/Instrumentation/CMakeLists.txt @@ -1,6 +1,5 @@ add_llvm_library(LLVMInstrumentation AddressSanitizer.cpp - BlackList.cpp BoundsChecking.cpp DebugIR.cpp EdgeProfiling.cpp diff --git a/lib/Transforms/Instrumentation/MemorySanitizer.cpp b/lib/Transforms/Instrumentation/MemorySanitizer.cpp index 8e2baef..0251f16 100644 --- a/lib/Transforms/Instrumentation/MemorySanitizer.cpp +++ b/lib/Transforms/Instrumentation/MemorySanitizer.cpp @@ -91,9 +91,9 @@ #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Transforms/Utils/BasicBlockUtils.h" -#include "llvm/Transforms/Utils/BlackList.h" #include "llvm/Transforms/Utils/Local.h" #include "llvm/Transforms/Utils/ModuleUtils.h" +#include "llvm/Transforms/Utils/SpecialCaseList.h" using namespace llvm; @@ -232,7 +232,7 @@ class MemorySanitizer : public FunctionPass { /// \brief Path to blacklist file. SmallString<64> BlacklistFile; /// \brief The blacklist. - OwningPtr<BlackList> BL; + OwningPtr<SpecialCaseList> BL; /// \brief An empty volatile inline asm that prevents callback merge. InlineAsm *EmptyAsm; @@ -338,7 +338,7 @@ bool MemorySanitizer::doInitialization(Module &M) { TD = getAnalysisIfAvailable<DataLayout>(); if (!TD) return false; - BL.reset(new BlackList(BlacklistFile)); + BL.reset(new SpecialCaseList(BlacklistFile)); C = &(M.getContext()); unsigned PtrSize = TD->getPointerSizeInBits(/* AddressSpace */0); switch (PtrSize) { diff --git a/lib/Transforms/Instrumentation/ThreadSanitizer.cpp b/lib/Transforms/Instrumentation/ThreadSanitizer.cpp index 318fa3f..cc971a3 100644 --- a/lib/Transforms/Instrumentation/ThreadSanitizer.cpp +++ b/lib/Transforms/Instrumentation/ThreadSanitizer.cpp @@ -41,8 +41,8 @@ #include "llvm/Support/MathExtras.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Transforms/Utils/BasicBlockUtils.h" -#include "llvm/Transforms/Utils/BlackList.h" #include "llvm/Transforms/Utils/ModuleUtils.h" +#include "llvm/Transforms/Utils/SpecialCaseList.h" using namespace llvm; @@ -99,7 +99,7 @@ struct ThreadSanitizer : public FunctionPass { DataLayout *TD; Type *IntptrTy; SmallString<64> BlacklistFile; - OwningPtr<BlackList> BL; + OwningPtr<SpecialCaseList> BL; IntegerType *OrdTy; // Callbacks to run-time library are computed in doInitialization. Function *TsanFuncEntry; @@ -227,7 +227,7 @@ bool ThreadSanitizer::doInitialization(Module &M) { TD = getAnalysisIfAvailable<DataLayout>(); if (!TD) return false; - BL.reset(new BlackList(BlacklistFile)); + BL.reset(new SpecialCaseList(BlacklistFile)); // Always insert a call to __tsan_init into the module's CTORs. IRBuilder<> IRB(M.getContext()); diff --git a/lib/Transforms/Utils/CMakeLists.txt b/lib/Transforms/Utils/CMakeLists.txt index b71628b..470cf34 100644 --- a/lib/Transforms/Utils/CMakeLists.txt +++ b/lib/Transforms/Utils/CMakeLists.txt @@ -28,6 +28,7 @@ add_llvm_library(LLVMTransformUtils SimplifyIndVar.cpp SimplifyInstructions.cpp SimplifyLibCalls.cpp + SpecialCaseList.cpp UnifyFunctionExitNodes.cpp Utils.cpp ValueMapper.cpp diff --git a/lib/Transforms/Instrumentation/BlackList.cpp b/lib/Transforms/Utils/SpecialCaseList.cpp index ce3acbc..a1083e3 100644 --- a/lib/Transforms/Instrumentation/BlackList.cpp +++ b/lib/Transforms/Utils/SpecialCaseList.cpp @@ -1,4 +1,4 @@ -//===-- BlackList.cpp - blacklist for sanitizers --------------------------===// +//===-- SpecialCaseList.cpp - blacklist for sanitizers --------------------===// // // The LLVM Compiler Infrastructure // @@ -13,7 +13,7 @@ // //===----------------------------------------------------------------------===// -#include "llvm/Transforms/Utils/BlackList.h" +#include "llvm/Transforms/Utils/SpecialCaseList.h" #include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringExtras.h" @@ -30,7 +30,7 @@ namespace llvm { -BlackList::BlackList(const StringRef Path) { +SpecialCaseList::SpecialCaseList(const StringRef Path) { // Validate and open blacklist file. if (Path.empty()) return; OwningPtr<MemoryBuffer> File; @@ -84,15 +84,15 @@ BlackList::BlackList(const StringRef Path) { } } -bool BlackList::isIn(const Function &F) const { +bool SpecialCaseList::isIn(const Function &F) const { return isIn(*F.getParent()) || inSection("fun", F.getName()); } -bool BlackList::isIn(const GlobalVariable &G) const { +bool SpecialCaseList::isIn(const GlobalVariable &G) const { return isIn(*G.getParent()) || inSection("global", G.getName()); } -bool BlackList::isIn(const Module &M) const { +bool SpecialCaseList::isIn(const Module &M) const { return inSection("src", M.getModuleIdentifier()); } @@ -107,15 +107,15 @@ static StringRef GetGVTypeString(const GlobalVariable &G) { return "<unknown type>"; } -bool BlackList::isInInit(const GlobalVariable &G) const { +bool SpecialCaseList::isInInit(const GlobalVariable &G) const { return (isIn(*G.getParent()) || inSection("global-init", G.getName()) || inSection("global-init-type", GetGVTypeString(G)) || inSection("global-init-src", G.getParent()->getModuleIdentifier())); } -bool BlackList::inSection(const StringRef Section, - const StringRef Query) const { +bool SpecialCaseList::inSection(const StringRef Section, + const StringRef Query) const { StringMap<Regex*>::const_iterator I = Entries.find(Section); if (I == Entries.end()) return false; |