[llvm-dev] How is target_triple/default_triple handled in tests?

Teresa Johnson via llvm-dev llvm-dev at lists.llvm.org
Thu Oct 6 13:40:44 PDT 2016


As part of trying to fix PR30610 (ThinLTO with module inline asm), I wanted
to add an assert that we have a Target and an MCAsmParser when we have
non-null module inline asm in IRObjectFile::CollectAsmUndefinedRefs.
Otherwise it silently fails to parse the module inline asm, which I
initially found when trying to add an 'opt' based test for my fix (because
'opt' wasn't initializing asm parsers, something I am fixing).

However, I had a test case failure in test/LTO/X86/current-section.ll,
which has module asm, but no target triple. However, it does have a
"REQUIRES: default_triple". Mehdi, looks like you added this as part of
D12660. I found that this is set to true in test/lit.cfg, and when I print
out the config.target_triple there it is x86_64-unknown-linux-gnu. But when
I print out the target triple on the Module in CollectAsmUndefinedRefs it
is null. How is the config.target_triple supposed to propagate into the
test - I assume that is the intention of requiring a default_triple?

Thanks,
Teresa

-- 
Teresa Johnson |  Software Engineer |  tejohnson at google.com |  408-460-2413
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161006/be683fe4/attachment.html>


More information about the llvm-dev mailing list