Skip to content

Commit ad683ca

Browse files
committed
Update LLVM
1 parent ef064d2 commit ad683ca

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
url = https://github.com/rust-lang-nursery/edition-guide.git
4343
[submodule "src/llvm-project"]
4444
path = src/llvm-project
45-
url = https://github.com/rust-lang/llvm-project.git
46-
branch = rustc/8.0-2019-03-18
45+
url = https://github.com/alexcrichton/llvm-project.git
46+
branch = rustc/9.0-2019-06-28
4747
[submodule "src/doc/embedded-book"]
4848
path = src/doc/embedded-book
4949
url = https://github.com/rust-embedded/book.git

src/llvm-project

Submodule llvm-project updated 35353 files

src/rustllvm/PassWrapper.cpp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,8 @@ static Optional<Reloc::Model> fromRust(LLVMRustRelocMode RustReloc) {
267267
#ifdef LLVM_RUSTLLVM
268268
/// getLongestEntryLength - Return the length of the longest entry in the table.
269269
///
270-
static size_t getLongestEntryLength(ArrayRef<SubtargetFeatureKV> Table) {
270+
template<typename T>
271+
static size_t getLongestEntryLength(ArrayRef<T> Table) {
271272
size_t MaxLen = 0;
272273
for (auto &I : Table)
273274
MaxLen = std::max(MaxLen, std::strlen(I.Key));
@@ -279,7 +280,7 @@ extern "C" void LLVMRustPrintTargetCPUs(LLVMTargetMachineRef TM) {
279280
const MCSubtargetInfo *MCInfo = Target->getMCSubtargetInfo();
280281
const Triple::ArchType HostArch = Triple(sys::getProcessTriple()).getArch();
281282
const Triple::ArchType TargetArch = Target->getTargetTriple().getArch();
282-
const ArrayRef<SubtargetFeatureKV> CPUTable = MCInfo->getCPUTable();
283+
const ArrayRef<SubtargetSubTypeKV> CPUTable = MCInfo->getCPUTable();
283284
unsigned MaxCPULen = getLongestEntryLength(CPUTable);
284285

285286
printf("Available CPUs for this target:\n");
@@ -289,7 +290,7 @@ extern "C" void LLVMRustPrintTargetCPUs(LLVMTargetMachineRef TM) {
289290
MaxCPULen, "native", (int)HostCPU.size(), HostCPU.data());
290291
}
291292
for (auto &CPU : CPUTable)
292-
printf(" %-*s - %s.\n", MaxCPULen, CPU.Key, CPU.Desc);
293+
printf(" %-*s\n", MaxCPULen, CPU.Key);
293294
printf("\n");
294295
}
295296

@@ -913,7 +914,14 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules,
913914
GlobalValue::LinkageTypes NewLinkage) {
914915
ResolvedODR[ModuleIdentifier][GUID] = NewLinkage;
915916
};
916-
#if LLVM_VERSION_GE(8, 0)
917+
#if LLVM_VERSION_GE(9, 0)
918+
thinLTOResolvePrevailingInIndex(
919+
Ret->Index,
920+
isPrevailing,
921+
recordNewLinkage,
922+
Ret->GUIDPreservedSymbols
923+
);
924+
#elif LLVM_VERSION_GE(8, 0)
917925
thinLTOResolvePrevailingInIndex(Ret->Index, isPrevailing, recordNewLinkage);
918926
#else
919927
thinLTOResolveWeakForLinkerInIndex(Ret->Index, isPrevailing, recordNewLinkage);

0 commit comments

Comments
 (0)