Abstract out member-pointer creation. I'm really unhappy about the current

duplication between the constant and non-constant paths in all of this.

Implement ARM ABI semantics for member pointer constants and conversion.

llvm-svn: 111772
This commit is contained in:
John McCall
2010-08-22 06:43:33 +00:00
parent 84fa510aa9
commit 1c456c89dc
9 changed files with 154 additions and 81 deletions

View File

@@ -713,8 +713,10 @@ static void TargetOptsToArgs(const TargetOptions &Opts,
Res.push_back("-target-linker-version");
Res.push_back(Opts.LinkerVersion);
}
Res.push_back("-cxx-abi");
Res.push_back(Opts.CXXABI);
if (!Opts.CXXABI.empty()) {
Res.push_back("-cxx-abi");
Res.push_back(Opts.CXXABI);
}
for (unsigned i = 0, e = Opts.Features.size(); i != e; ++i) {
Res.push_back("-target-feature");
Res.push_back(Opts.Features[i]);
@@ -1471,10 +1473,6 @@ static void ParseTargetArgs(TargetOptions &Opts, ArgList &Args) {
// Use the host triple if unspecified.
if (Opts.Triple.empty())
Opts.Triple = llvm::sys::getHostTriple();
// Use the Itanium C++ ABI if unspecified.
if (Opts.CXXABI.empty())
Opts.CXXABI = "itanium";
}
//