OSDN Git Service

[Modules] Move the LeakDetector header into the IR library where the
authorChandler Carruth <chandlerc@gmail.com>
Tue, 4 Mar 2014 12:46:06 +0000 (12:46 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Tue, 4 Mar 2014 12:46:06 +0000 (12:46 +0000)
source file had already been moved. Also move the unittest into the IR
unittest library.

This may seem an odd thing to put in the IR library but we only really
use this with instructions and it needs the LLVM context to work, so it
is intrinsically tied to the IR library.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202842 91177308-0d34-0410-b5e6-96231b3b80d8

13 files changed:
include/llvm/IR/LeakDetector.h [moved from include/llvm/Support/LeakDetector.h with 95% similarity]
lib/CodeGen/MachineBasicBlock.cpp
lib/IR/BasicBlock.cpp
lib/IR/Function.cpp
lib/IR/Globals.cpp
lib/IR/Instruction.cpp
lib/IR/LeakDetector.cpp
lib/IR/Metadata.cpp
lib/IR/Module.cpp
lib/IR/Value.cpp
unittests/IR/CMakeLists.txt
unittests/IR/LeakDetectorTest.cpp [moved from unittests/Support/LeakDetectorTest.cpp with 86% similarity]
unittests/Support/CMakeLists.txt

similarity index 95%
rename from include/llvm/Support/LeakDetector.h
rename to include/llvm/IR/LeakDetector.h
index 501a9db..cb18df8 100644 (file)
@@ -1,4 +1,4 @@
-//===-- llvm/Support/LeakDetector.h - Provide leak detection ----*- C++ -*-===//
+//===- LeakDetector.h - Provide leak detection ------------------*- C++ -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -19,8 +19,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_SUPPORT_LEAKDETECTOR_H
-#define LLVM_SUPPORT_LEAKDETECTOR_H
+#ifndef LLVM_IR_LEAKDETECTOR_H
+#define LLVM_IR_LEAKDETECTOR_H
 
 #include <string>
 
index 769ba2a..077e74d 100644 (file)
 #include "llvm/CodeGen/SlotIndexes.h"
 #include "llvm/IR/BasicBlock.h"
 #include "llvm/IR/DataLayout.h"
+#include "llvm/IR/LeakDetector.h"
 #include "llvm/MC/MCAsmInfo.h"
 #include "llvm/MC/MCContext.h"
 #include "llvm/Support/Debug.h"
-#include "llvm/Support/LeakDetector.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Target/TargetInstrInfo.h"
 #include "llvm/Target/TargetMachine.h"
index 1b1236b..ef264d2 100644 (file)
@@ -19,8 +19,8 @@
 #include "llvm/IR/Instructions.h"
 #include "llvm/IR/IntrinsicInst.h"
 #include "llvm/IR/LLVMContext.h"
+#include "llvm/IR/LeakDetector.h"
 #include "llvm/IR/Type.h"
-#include "llvm/Support/LeakDetector.h"
 #include <algorithm>
 using namespace llvm;
 
index 6d418a4..72f38c5 100644 (file)
@@ -23,8 +23,8 @@
 #include "llvm/IR/InstIterator.h"
 #include "llvm/IR/IntrinsicInst.h"
 #include "llvm/IR/LLVMContext.h"
+#include "llvm/IR/LeakDetector.h"
 #include "llvm/IR/Module.h"
-#include "llvm/Support/LeakDetector.h"
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/RWMutex.h"
 #include "llvm/Support/StringPool.h"
index ee882c3..11152d5 100644 (file)
@@ -18,9 +18,9 @@
 #include "llvm/IR/DerivedTypes.h"
 #include "llvm/IR/GlobalAlias.h"
 #include "llvm/IR/GlobalVariable.h"
+#include "llvm/IR/LeakDetector.h"
 #include "llvm/IR/Module.h"
 #include "llvm/Support/ErrorHandling.h"
-#include "llvm/Support/LeakDetector.h"
 using namespace llvm;
 
 //===----------------------------------------------------------------------===//
index a08cd9f..4bcf748 100644 (file)
 #include "llvm/IR/CallSite.h"
 #include "llvm/IR/Constants.h"
 #include "llvm/IR/Instructions.h"
+#include "llvm/IR/LeakDetector.h"
 #include "llvm/IR/Module.h"
 #include "llvm/IR/Operator.h"
 #include "llvm/IR/Type.h"
-#include "llvm/Support/LeakDetector.h"
 using namespace llvm;
 
 Instruction::Instruction(Type *ty, unsigned it, Use *Ops, unsigned NumOps,
index 835e5e6..6f71627 100644 (file)
@@ -11,7 +11,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/Support/LeakDetector.h"
+#include "llvm/IR/LeakDetector.h"
 #include "LLVMContextImpl.h"
 #include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/IR/Value.h"
index d46eec6..f8a1776 100644 (file)
@@ -22,9 +22,9 @@
 #include "llvm/IR/ConstantRange.h"
 #include "llvm/IR/Instruction.h"
 #include "llvm/IR/LLVMContext.h"
+#include "llvm/IR/LeakDetector.h"
 #include "llvm/IR/Module.h"
 #include "llvm/IR/ValueHandle.h"
-#include "llvm/Support/LeakDetector.h"
 using namespace llvm;
 
 //===----------------------------------------------------------------------===//
index 4204c8e..d3ef219 100644 (file)
@@ -22,7 +22,7 @@
 #include "llvm/IR/DerivedTypes.h"
 #include "llvm/IR/InstrTypes.h"
 #include "llvm/IR/LLVMContext.h"
-#include "llvm/Support/LeakDetector.h"
+#include "llvm/IR/LeakDetector.h"
 #include <algorithm>
 #include <cstdarg>
 #include <cstdlib>
index eb12bc5..bdb544b 100644 (file)
 #include "llvm/IR/GetElementPtrTypeIterator.h"
 #include "llvm/IR/InstrTypes.h"
 #include "llvm/IR/Instructions.h"
+#include "llvm/IR/LeakDetector.h"
 #include "llvm/IR/Module.h"
 #include "llvm/IR/Operator.h"
 #include "llvm/IR/ValueHandle.h"
 #include "llvm/IR/ValueSymbolTable.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/ErrorHandling.h"
-#include "llvm/Support/LeakDetector.h"
 #include "llvm/Support/ManagedStatic.h"
 #include <algorithm>
 using namespace llvm;
index e1c295d..7368a24 100644 (file)
@@ -13,6 +13,7 @@ set(IRSources
   DominatorTreeTest.cpp
   IRBuilderTest.cpp
   InstructionsTest.cpp
+  LeakDetectorTest.cpp
   LegacyPassManagerTest.cpp
   MDBuilderTest.cpp
   MetadataTest.cpp
similarity index 86%
rename from unittests/Support/LeakDetectorTest.cpp
rename to unittests/IR/LeakDetectorTest.cpp
index d198c7a..94eed4c 100644 (file)
@@ -1,4 +1,4 @@
-//===- llvm/unittest/LeakDetector/LeakDetector.cpp - LeakDetector tests ---===//
+//===- LeakDetectorTest.cpp -----------------------------------------------===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "llvm/IR/LeakDetector.h"
 #include "gtest/gtest.h"
-#include "llvm/Support/LeakDetector.h"
 
 using namespace llvm;
 
index 9df2e17..93f707e 100644 (file)
@@ -17,7 +17,6 @@ add_llvm_unittest(SupportTests
   ErrorOrTest.cpp
   FileOutputBufferTest.cpp
   LEB128Test.cpp
-  LeakDetectorTest.cpp
   LineIteratorTest.cpp
   LockFileManagerTest.cpp
   ManagedStatic.cpp