[patch] Assert that clang's datalayout strings are in sync with llvm's

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Dec 20 08:58:49 PST 2013


> Given what a corner case this is, it might be reasonable to just pass
> an empty string in CodeGenAction.cpp:424 or maybe patch the Triple in
> the module. After all, clang always creates a single TargetInfo based
> on what is passed to -triple (or the system default), in cannot really
> handle an IR file with a different one.

Or now that I think of it. Maybe producing a proper error when the
-triple doesn't match the bitcode would be best. We can then update
ir-support-codegen.ll to have to run lines, one with a matching
-triple to check that it works and one with a different one to check
that it produces an error.

I can try to implement that first if you agree it is the right thing to do.

Cheers,
Rafael



More information about the cfe-commits mailing list