mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 23:17:16 +00:00
Revert r111007.
Apparently, this is now fixed in Clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111032 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -17,8 +17,6 @@
|
||||
#include "llvm/ADT/IntrusiveRefCntPtr.h"
|
||||
#include "llvm/ADT/StringMap.h"
|
||||
#include "llvm/ADT/StringSet.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/System/Path.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
@@ -29,8 +27,6 @@
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
extern cl::opt<std::string> InputFilename;
|
||||
|
||||
namespace {
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
@@ -2978,18 +2974,9 @@ void EmitHookDeclarations(const ToolDescriptions& ToolDescs,
|
||||
O << "}\n\n";
|
||||
}
|
||||
|
||||
std::string GetPluginName() {
|
||||
if (!InputFilename.empty()) {
|
||||
return sys::Path(InputFilename).getBasename();
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
/// EmitRegisterPlugin - Emit code to register this plugin.
|
||||
void EmitRegisterPlugin(int Priority, raw_ostream& O) {
|
||||
O << "struct Plugin" << GetPluginName()
|
||||
<< " : public llvmc::BasePlugin {\n\n";
|
||||
O << "struct Plugin : public llvmc::BasePlugin {\n\n";
|
||||
O.indent(Indent1) << "int Priority() const { return "
|
||||
<< Priority << "; }\n\n";
|
||||
O.indent(Indent1) << "int PreprocessOptions() const\n";
|
||||
@@ -3000,8 +2987,7 @@ void EmitRegisterPlugin(int Priority, raw_ostream& O) {
|
||||
<< "int PopulateCompilationGraph(CompilationGraph& graph) const\n";
|
||||
O.indent(Indent1) << "{ return PopulateCompilationGraphLocal(graph); }\n"
|
||||
<< "};\n\n"
|
||||
<< "static llvmc::RegisterPlugin<Plugin"
|
||||
<< GetPluginName()<< "> RP;\n\n";
|
||||
<< "static llvmc::RegisterPlugin<Plugin> RP;\n\n";
|
||||
}
|
||||
|
||||
/// EmitIncludes - Emit necessary #include directives and some
|
||||
|
||||
Reference in New Issue
Block a user