Details
- Reviewers
dblaikie inglorion echristo probinson aprantl - Commits
- rG06b1af5bf117: Use filename in linemarker when compiling preprocessed source (Revised)
rC297194: Use filename in linemarker when compiling preprocessed source (Revised)
rL297194: Use filename in linemarker when compiling preprocessed source (Revised)
Diff Detail
- Build Status
Buildable 4549 Build 4549: arc lint + arc unit
Event Timeline
test/Frontend/preprocessed-input.c | ||
---|---|---|
3 ↗ | (On Diff #90722) | Actually, I think you don't even have to run the preprocessor - you can just put the file with the linemarker here and check that the name from the linemarker is propagated, right? Also, it seems that there is a similar issue to the one you're trying to fix when going from .ll to .o (or .ll to .s, for that matter) - the name is taken from the file you're reading from, not from the source_filename directive in that file. Of course, that doesn't differ from gcc (given that gcc doesn't handle .ll files), but you may want to address that, too, for consistency. |
test/Frontend/preprocessed-input.c | ||
---|---|---|
3 ↗ | (On Diff #90722) | @inglorion Thanks for the comments! Putting preprocessed file makes sense to me. I recognize the second issue. If I do something like clang -E -o test.i /abspath/test.c clang -g -c -o test.o test.i DW_AT_name is still test.i (for gcc, it is taken from the linemarker as well). Moreover, if we use the absolute path of test.i for clang, i.e. clang -g -c -o test.o /abspath/test.i DW_AT_name becomes /abspath/test.i where DW_AT_comp_dir is /abspath. I think this could be a problem if the user of the object file assumes that DW_AT_name is a relative to DW_AT_comp_dir. I'm planning to address this with a separate patch. |