Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions interpreter/cling/lib/Interpreter/IncrementalParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,7 @@ namespace cling {

llvm::Module* IncrementalParser::StartModule() {
return m_Interpreter->withLLVMContextDo([&](llvm::LLVMContext* Ctx) {
return getCodeGenerator()->StartModule(makeModuleName(), *Ctx,
getCI()->getCodeGenOpts());
return getCodeGenerator()->StartModule(makeModuleName(), *Ctx);
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,6 @@ class CodeGenerator : public ASTConsumer {
/// enable codegen in interactive processing environments.
llvm::Module* StartModule(llvm::StringRef ModuleName, llvm::LLVMContext &C);

llvm::Module *StartModule(llvm::StringRef ModuleName, llvm::LLVMContext &C,
const CodeGenOptions &CGO);

void forgetGlobal(llvm::GlobalValue *GV);
void forgetDecl(llvm::StringRef MangledName);
};
Expand Down
15 changes: 1 addition & 14 deletions interpreter/llvm-project/clang/lib/CodeGen/ModuleBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace clang {
IntrusiveRefCntPtr<llvm::vfs::FileSystem> FS; // Only used for debug info.
const HeaderSearchOptions &HeaderSearchOpts; // Only used for debug info.
const PreprocessorOptions &PreprocessorOpts; // Only used for debug info.
CodeGenOptions CodeGenOpts; // Intentionally copied in.
const CodeGenOptions &CodeGenOpts;

unsigned HandlingTopLevelDecls;

Expand Down Expand Up @@ -267,12 +267,6 @@ namespace clang {
return M.get();
}

llvm::Module *StartModule(llvm::StringRef ModuleName, llvm::LLVMContext &C,
const CodeGenOptions &CGO) {
CodeGenOpts = CGO;
return StartModule(ModuleName, C);
}

void forgetGlobal(llvm::GlobalValue *GV) {
for (auto I = Builder->ConstantStringMap.begin(),
E = Builder->ConstantStringMap.end();
Expand Down Expand Up @@ -511,13 +505,6 @@ llvm::Module *CodeGenerator::StartModule(llvm::StringRef ModuleName,
return static_cast<CodeGeneratorImpl*>(this)->StartModule(ModuleName, C);
}

llvm::Module *CodeGenerator::StartModule(llvm::StringRef ModuleName,
llvm::LLVMContext &C,
const CodeGenOptions &CGO) {
return static_cast<CodeGeneratorImpl *>(this)->StartModule(ModuleName, C,
CGO);
}

void CodeGenerator::forgetGlobal(llvm::GlobalValue *GV) {
static_cast<CodeGeneratorImpl *>(this)->forgetGlobal(GV);
}
Expand Down
Loading