This feature is needed to re-enable rL293004, which resembles gcc's behavior in
finding the input file name from a preprocessed source. The patch has been
reverted in rL293032, because the test checks FILE symbol of ELF file, which is
not valid on OSes not using ELF. With the patch, we can add "REQUIRES: linux"
to the tests on ELF files, or tests that require any linux-specific features.
Details
Details
Diff Detail
Diff Detail
- Build Status
Buildable 4497 Build 4497: arc lint + arc unit
Event Timeline
Comment Actions
Checking for linux when really you want to check for ELF doesn't seem right. In this case, I think there is an better way to do it; instead of relying on llvm-objdump, could you emit an LLVM assembly file and check that for presence of the string you want? I think if you compile with clang -g -S -emit-llvm, it will give you LLVM assembly with metadata for the records you need and you won't need to generate an object file.
Comment Actions
@inglorion That makes a lot of sense. Maybe we don't even need -g, because -S -emit-llvm shows source_filename. I'll run some more experiments with relpath/abspath and debug locations, and submit a revised patch. Thanks for the comment!