mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-15 07:39:31 +00:00
[dsymutil] Fix -arch option for thumb variants.
r267249 removed the dual ARM/Thumb interface from MachOObjectFile, simplifying llvm-dsymutil's code. This unfortunately also regressed llvm-dsymutil's ability to select thumb slices, because the simplified code was also dealing with the discrepency between the slice arch (eg. armv7m) and the triple arch name (eg. thumbv7m). llvm-svn: 268894
This commit is contained in:
parent
f0db9d6006
commit
ca05ea2936
13
test/tools/dsymutil/ARM/thumb.c
Normal file
13
test/tools/dsymutil/ARM/thumb.c
Normal file
@ -0,0 +1,13 @@
|
||||
// RUN: llvm-dsymutil -f -oso-prepend-path=%p/.. %p/../Inputs/thumb.armv7m -o - | llvm-dwarfdump - | FileCheck %s
|
||||
// RUN: llvm-dsymutil -arch armv7m -f -oso-prepend-path=%p/.. %p/../Inputs/thumb.armv7m -o - | llvm-dwarfdump - | FileCheck %s
|
||||
|
||||
/* Compile with:
|
||||
clang -c thumb.c -arch armv7m -g
|
||||
clang thumb.o -o thumb.armv7m -arch armv7m -nostdlib -static -Wl,-e,_start
|
||||
*/
|
||||
|
||||
void start() {
|
||||
}
|
||||
|
||||
CHECK: DW_AT_name{{.*}}"thumb.c"
|
||||
CHECK: DW_AT_name{{.*}}"start"
|
BIN
test/tools/dsymutil/Inputs/thumb.armv7m
Executable file
BIN
test/tools/dsymutil/Inputs/thumb.armv7m
Executable file
Binary file not shown.
BIN
test/tools/dsymutil/Inputs/thumb.o
Normal file
BIN
test/tools/dsymutil/Inputs/thumb.o
Normal file
Binary file not shown.
@ -294,7 +294,11 @@ static bool shouldLinkArch(SmallVectorImpl<StringRef> &Archs, StringRef Arch) {
|
||||
std::find(Archs.begin(), Archs.end(), "arm") != Archs.end())
|
||||
return true;
|
||||
|
||||
return std::find(Archs.begin(), Archs.end(), Arch) != Archs.end();
|
||||
SmallString<16> ArchName = Arch;
|
||||
if (Arch.startswith("thumb"))
|
||||
ArchName = ("arm" + Arch.substr(5)).str();
|
||||
|
||||
return std::find(Archs.begin(), Archs.end(), ArchName) != Archs.end();
|
||||
}
|
||||
|
||||
bool MachODebugMapParser::dumpStab() {
|
||||
|
Loading…
Reference in New Issue
Block a user