[cfe-dev] clarifying a comment in TargetOptions.h

Olaf Krzikalla Olaf.Krzikalla at tu-dresden.de
Mon Nov 30 05:56:10 PST 2009


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
Olaf




More information about the cfe-dev mailing list