summaryrefslogtreecommitdiffstats
path: root/clang/Driver/clang.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-03-05 01:18:20 +0000
committerChris Lattner <sabre@nondot.org>2008-03-05 01:18:20 +0000
commit855d024a83fac2913f993dc263923cad09cba411 (patch)
tree43984ab87b696e5137fd0c9c56490276d8165523 /clang/Driver/clang.cpp
parent357061a74d2b44889e3239cefdd07610b6cac6ac (diff)
downloadbcm5719-llvm-855d024a83fac2913f993dc263923cad09cba411.tar.gz
bcm5719-llvm-855d024a83fac2913f993dc263923cad09cba411.zip
Remove the first layer of support for "portability" warnings. This is
theoretically useful, but not useful in practice. It adds a bunch of complexity, and not much value. It's best to nuke it. One big advantage is that it means the target interfaces will soon lose their SLoc arguments and target queries can never emit diagnostics anymore (yay). Removing this also simplifies some of the core preprocessor which should make it slightly faster. Ted, I didn't simplify TripleProcessor, which can now have at most one triple, and can probably just be removed. Please poke at it when you have time. llvm-svn: 47930
Diffstat (limited to 'clang/Driver/clang.cpp')
-rw-r--r--clang/Driver/clang.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/clang/Driver/clang.cpp b/clang/Driver/clang.cpp
index 5d004977ca1..f5790df482e 100644
--- a/clang/Driver/clang.cpp
+++ b/clang/Driver/clang.cpp
@@ -466,7 +466,7 @@ static llvm::cl::opt<std::string>
TargetTriple("triple",
llvm::cl::desc("Specify target triple (e.g. i686-apple-darwin9)."));
-static llvm::cl::list<std::string>
+static llvm::cl::opt<std::string>
Archs("arch",
llvm::cl::desc("Specify target architecture (e.g. i686)."));
@@ -518,9 +518,9 @@ static void CreateTargetTriples(std::vector<std::string>& triples) {
// host-triple with no archs or using a specified target triple.
if (!TargetTriple.getValue().empty() || Archs.empty())
tp.addTriple(Triple);
-
- for (unsigned i = 0, e = Archs.size(); i !=e; ++i)
- tp.addTriple(Archs[i] + "-" + suffix);
+
+ if (!Archs.empty())
+ tp.addTriple(Archs + "-" + suffix);
}
//===----------------------------------------------------------------------===//
@@ -1307,14 +1307,9 @@ int main(int argc, char **argv) {
// Get information about the targets being compiled for. Note that this
// pointer and the TargetInfoImpl objects are never deleted by this toy
// driver.
- TargetInfo *Target;
-
- // Create triples, and create the TargetInfo.
std::vector<std::string> triples;
CreateTargetTriples(triples);
- Target = TargetInfo::CreateTargetInfo(&triples[0],
- &triples[0]+triples.size(),
- &Diags);
+ TargetInfo *Target = TargetInfo::CreateTargetInfo(triples[0]);
if (Target == 0) {
fprintf(stderr, "Sorry, I don't know what target this is: %s\n",
OpenPOWER on IntegriCloud