clarifying a comment in TargetOptions.h

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

clarifying a comment in TargetOptions.h

Olaf Krzikalla
Hi @clang,

the comment to the member var Triple in class TargetOptions suggest that
it is ok to leave it default constructed if the target is the host.
However this is not the case: passing a default constructed
TargetOptions class to TargetInfo::CreateTargetInfo returns a NULL
pointer due to a empty Tripel member. This member needs to be
initialized (e.g. with llvm::sys::getHostTriple()). So either the
comment or TargetInfo::CreateTargetInfo has to be fixed (or
TargetOptions needs a ctor).

Best regards

cfe-dev mailing list
[hidden email]