aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-11-04 21:13:15 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-11-04 21:13:15 +0000
commit938963f076418aa61b570e5317240f66642af2df (patch)
treef4ce2da6486dede8022ced83b8bfd98781206890
parent468fe246192c3683360d1a6b1b333d85b8794f77 (diff)
InitializePreprocessor cannot fail.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86048 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Frontend/InitPreprocessor.h4
-rw-r--r--lib/Frontend/InitPreprocessor.cpp5
-rw-r--r--tools/clang-cc/clang-cc.cpp3
3 files changed, 4 insertions, 8 deletions
diff --git a/include/clang/Frontend/InitPreprocessor.h b/include/clang/Frontend/InitPreprocessor.h
index bf27b19aa3..415acea79a 100644
--- a/include/clang/Frontend/InitPreprocessor.h
+++ b/include/clang/Frontend/InitPreprocessor.h
@@ -69,9 +69,9 @@ public:
};
/// InitializePreprocessor - Initialize the preprocessor getting it and the
-/// environment ready to process a single file. This returns true on error.
+/// environment ready to process a single file.
///
-bool InitializePreprocessor(Preprocessor &PP,
+void InitializePreprocessor(Preprocessor &PP,
const PreprocessorInitOptions& InitOptions);
} // end namespace clang
diff --git a/lib/Frontend/InitPreprocessor.cpp b/lib/Frontend/InitPreprocessor.cpp
index 3a54d1dca7..7139e55f0b 100644
--- a/lib/Frontend/InitPreprocessor.cpp
+++ b/lib/Frontend/InitPreprocessor.cpp
@@ -442,7 +442,7 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
/// InitializePreprocessor - Initialize the preprocessor getting it and the
/// environment ready to process a single file. This returns true on error.
///
-bool clang::InitializePreprocessor(Preprocessor &PP,
+void clang::InitializePreprocessor(Preprocessor &PP,
const PreprocessorInitOptions &InitOpts) {
std::vector<char> PredefineBuffer;
@@ -488,7 +488,4 @@ bool clang::InitializePreprocessor(Preprocessor &PP,
// Null terminate PredefinedBuffer and add it.
PredefineBuffer.push_back(0);
PP.setPredefines(&PredefineBuffer[0]);
-
- // Once we've read this, we're done.
- return false;
}
diff --git a/tools/clang-cc/clang-cc.cpp b/tools/clang-cc/clang-cc.cpp
index 66aa19a5d3..95f6370401 100644
--- a/tools/clang-cc/clang-cc.cpp
+++ b/tools/clang-cc/clang-cc.cpp
@@ -1251,8 +1251,7 @@ public:
PreprocessorInitOptions InitOpts;
InitializePreprocessorInitOptions(InitOpts);
- if (InitializePreprocessor(*PP, InitOpts))
- return 0;
+ InitializePreprocessor(*PP, InitOpts);
return PP.take();
}