Skip to content

Commit eacefa3

Browse files
authored
Catch up with upstream (#43)
* CodeGenType enum moded to `llvm` namespace https://gihub.com/llvm/llvm-project.git@1dfede3 * MaybeAlign for AllocaInst https://github.com/llvm/llvm-project.git@e8a0a09 * Use local FileCheck
1 parent c0d1b4d commit eacefa3

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

lib/CodeGen/BackendUtil.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -417,11 +417,11 @@ bool EmitAssemblyHelper::AddEmitPasses(BackendAction Action,
417417

418418
// Normal mode, emit a .s or .o file by running the code generator. Note,
419419
// this also adds codegenerator level optimization passes.
420-
TargetMachine::CodeGenFileType CGFT = TargetMachine::CGFT_AssemblyFile;
420+
CodeGenFileType CGFT = CGFT_AssemblyFile;
421421
if (Action == Backend_EmitObj)
422-
CGFT = TargetMachine::CGFT_ObjectFile;
422+
CGFT = CGFT_ObjectFile;
423423
else if (Action == Backend_EmitMCNull)
424-
CGFT = TargetMachine::CGFT_Null;
424+
CGFT = CGFT_Null;
425425
else
426426
assert(Action == Backend_EmitAssembly && "Invalid action!");
427427

lib/CodeGen/CGDecl.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ CodeGenFunction::EmitEquivalenceSet(const EquivalenceSet *S) {
151151
new llvm::AllocaInst(
152152
CGM.Int8Ty, DL.getAllocaAddrSpace(),
153153
llvm::ConstantInt::get(CGM.SizeTy, HighestBound - LowestBound),
154-
CGM.getDataLayout().getTypeStoreSize(CGM.DoubleTy)),
154+
llvm::MaybeAlign(CGM.getDataLayout().getTypeStoreSize(CGM.DoubleTy))),
155155
"equivalence-set");
156156
#if 0
157157
AllocaInst(Type *Ty, unsigned AddrSpace,

test/lit.site.cfg.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ except KeyError:
1919

2020
# Let the main config do the real work.
2121
config.test_dir = "@FORT_SOURCE_DIR@/test"
22-
config.file_check = "@LLVM_BINARY_DIR@/bin/FileCheck"
22+
config.file_check = "@FORT_BINARY_DIR@/bin/FileCheck"
2323
lit_config.load_config(config, "@FORT_SOURCE_DIR@/test/lit.cfg")
2424

tools/driver/Main.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,12 @@ static bool EmitFile(llvm::raw_pwrite_stream &Out, llvm::Module *Module,
120120
if (Action == Backend_EmitObj || Action == Backend_EmitAssembly) {
121121
llvm::Module &Mod = *Module;
122122

123-
llvm::TargetMachine::CodeGenFileType CGFT =
124-
llvm::TargetMachine::CGFT_AssemblyFile;
123+
CodeGenFileType CGFT = CGFT_AssemblyFile;
125124

126125
if (Action == Backend_EmitObj)
127-
CGFT = llvm::TargetMachine::CGFT_ObjectFile;
126+
CGFT = CGFT_ObjectFile;
128127
else if (Action == Backend_EmitMCNull)
129-
CGFT = llvm::TargetMachine::CGFT_Null;
128+
CGFT = CGFT_Null;
130129
else
131130
assert(Action == Backend_EmitAssembly && "Invalid action!");
132131

0 commit comments

Comments
 (0)