[llvm] r203065 - [Layering] Sink Linker.h into a Linker subdirectory to make it
Chandler Carruth
chandlerc at gmail.com
Wed Mar 5 19:42:24 PST 2014
Author: chandlerc
Date: Wed Mar 5 21:42:23 2014
New Revision: 203065
URL: http://llvm.org/viewvc/llvm-project?rev=203065&view=rev
Log:
[Layering] Sink Linker.h into a Linker subdirectory to make it
consistent with every other sub-library header in LLVM.
Added:
llvm/trunk/include/llvm/Linker/
llvm/trunk/include/llvm/Linker/Linker.h
- copied, changed from r203064, llvm/trunk/include/llvm/Linker.h
Removed:
llvm/trunk/include/llvm/Linker.h
Modified:
llvm/trunk/include/llvm/LTO/LTOCodeGenerator.h
llvm/trunk/lib/LTO/LTOCodeGenerator.cpp
llvm/trunk/lib/Linker/LinkModules.cpp
llvm/trunk/tools/bugpoint/BugDriver.cpp
llvm/trunk/tools/bugpoint/Miscompilation.cpp
llvm/trunk/tools/llvm-link/llvm-link.cpp
llvm/trunk/unittests/Linker/LinkModulesTest.cpp
Modified: llvm/trunk/include/llvm/LTO/LTOCodeGenerator.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/LTO/LTOCodeGenerator.h?rev=203065&r1=203064&r2=203065&view=diff
==============================================================================
--- llvm/trunk/include/llvm/LTO/LTOCodeGenerator.h (original)
+++ llvm/trunk/include/llvm/LTO/LTOCodeGenerator.h Wed Mar 5 21:42:23 2014
@@ -39,7 +39,7 @@
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/StringMap.h"
-#include "llvm/Linker.h"
+#include "llvm/Linker/Linker.h"
#include "llvm/Target/TargetOptions.h"
#include <string>
#include <vector>
Removed: llvm/trunk/include/llvm/Linker.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Linker.h?rev=203064&view=auto
==============================================================================
--- llvm/trunk/include/llvm/Linker.h (original)
+++ llvm/trunk/include/llvm/Linker.h (removed)
@@ -1,61 +0,0 @@
-//===- llvm/Linker.h - Module Linker Interface ------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_LINKER_H
-#define LLVM_LINKER_H
-
-#include "llvm/ADT/SmallPtrSet.h"
-#include <string>
-
-namespace llvm {
-
-class Module;
-class StringRef;
-class StructType;
-
-/// This class provides the core functionality of linking in LLVM. It keeps a
-/// pointer to the merged module so far. It doesn't take ownership of the
-/// module since it is assumed that the user of this class will want to do
-/// something with it after the linking.
-class Linker {
- public:
- enum LinkerMode {
- DestroySource = 0, // Allow source module to be destroyed.
- PreserveSource = 1 // Preserve the source module.
- };
-
- Linker(Module *M, bool SuppressWarnings=false);
- ~Linker();
-
- Module *getModule() const { return Composite; }
- void deleteModule();
-
- /// \brief Link \p Src into the composite. The source is destroyed if
- /// \p Mode is DestroySource and preserved if it is PreserveSource.
- /// If \p ErrorMsg is not null, information about any error is written
- /// to it.
- /// Returns true on error.
- bool linkInModule(Module *Src, unsigned Mode, std::string *ErrorMsg);
- bool linkInModule(Module *Src, std::string *ErrorMsg) {
- return linkInModule(Src, Linker::DestroySource, ErrorMsg);
- }
-
- static bool LinkModules(Module *Dest, Module *Src, unsigned Mode,
- std::string *ErrorMsg);
-
- private:
- Module *Composite;
- SmallPtrSet<StructType*, 32> IdentifiedStructTypes;
-
- bool SuppressWarnings;
-};
-
-} // End llvm namespace
-
-#endif
Copied: llvm/trunk/include/llvm/Linker/Linker.h (from r203064, llvm/trunk/include/llvm/Linker.h)
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Linker/Linker.h?p2=llvm/trunk/include/llvm/Linker/Linker.h&p1=llvm/trunk/include/llvm/Linker.h&r1=203064&r2=203065&rev=203065&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Linker.h (original)
+++ llvm/trunk/include/llvm/Linker/Linker.h Wed Mar 5 21:42:23 2014
@@ -1,4 +1,4 @@
-//===- llvm/Linker.h - Module Linker Interface ------------------*- C++ -*-===//
+//===- Linker.h - Module Linker Interface -----------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_LINKER_H
-#define LLVM_LINKER_H
+#ifndef LLVM_LINKER_LINKER_H
+#define LLVM_LINKER_LINKER_H
#include "llvm/ADT/SmallPtrSet.h"
#include <string>
Modified: llvm/trunk/lib/LTO/LTOCodeGenerator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LTO/LTOCodeGenerator.cpp?rev=203065&r1=203064&r2=203065&view=diff
==============================================================================
--- llvm/trunk/lib/LTO/LTOCodeGenerator.cpp (original)
+++ llvm/trunk/lib/LTO/LTOCodeGenerator.cpp Wed Mar 5 21:42:23 2014
@@ -29,7 +29,7 @@
#include "llvm/IR/Verifier.h"
#include "llvm/InitializePasses.h"
#include "llvm/LTO/LTOModule.h"
-#include "llvm/Linker.h"
+#include "llvm/Linker/Linker.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/SubtargetFeature.h"
Modified: llvm/trunk/lib/Linker/LinkModules.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/LinkModules.cpp?rev=203065&r1=203064&r2=203065&view=diff
==============================================================================
--- llvm/trunk/lib/Linker/LinkModules.cpp (original)
+++ llvm/trunk/lib/Linker/LinkModules.cpp Wed Mar 5 21:42:23 2014
@@ -11,7 +11,7 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm/Linker.h"
+#include "llvm/Linker/Linker.h"
#include "llvm-c/Linker.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/SetVector.h"
Modified: llvm/trunk/tools/bugpoint/BugDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/BugDriver.cpp?rev=203065&r1=203064&r2=203065&view=diff
==============================================================================
--- llvm/trunk/tools/bugpoint/BugDriver.cpp (original)
+++ llvm/trunk/tools/bugpoint/BugDriver.cpp Wed Mar 5 21:42:23 2014
@@ -17,7 +17,7 @@
#include "ToolRunner.h"
#include "llvm/IR/Module.h"
#include "llvm/IRReader/IRReader.h"
-#include "llvm/Linker.h"
+#include "llvm/Linker/Linker.h"
#include "llvm/Pass.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FileUtilities.h"
Modified: llvm/trunk/tools/bugpoint/Miscompilation.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/Miscompilation.cpp?rev=203065&r1=203064&r2=203065&view=diff
==============================================================================
--- llvm/trunk/tools/bugpoint/Miscompilation.cpp (original)
+++ llvm/trunk/tools/bugpoint/Miscompilation.cpp Wed Mar 5 21:42:23 2014
@@ -21,7 +21,7 @@
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Verifier.h"
-#include "llvm/Linker.h"
+#include "llvm/Linker/Linker.h"
#include "llvm/Pass.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FileUtilities.h"
Modified: llvm/trunk/tools/llvm-link/llvm-link.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-link/llvm-link.cpp?rev=203065&r1=203064&r2=203065&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-link/llvm-link.cpp (original)
+++ llvm/trunk/tools/llvm-link/llvm-link.cpp Wed Mar 5 21:42:23 2014
@@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm/Linker.h"
+#include "llvm/Linker/Linker.h"
#include "llvm/Bitcode/ReaderWriter.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
Modified: llvm/trunk/unittests/Linker/LinkModulesTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Linker/LinkModulesTest.cpp?rev=203065&r1=203064&r2=203065&view=diff
==============================================================================
--- llvm/trunk/unittests/Linker/LinkModulesTest.cpp (original)
+++ llvm/trunk/unittests/Linker/LinkModulesTest.cpp Wed Mar 5 21:42:23 2014
@@ -7,7 +7,7 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm/Linker.h"
+#include "llvm/Linker/Linker.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Function.h"
More information about the llvm-commits
mailing list