aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Frontend
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Frontend')
-rw-r--r--include/clang/Frontend/ASTUnit.h28
-rw-r--r--include/clang/Frontend/CommandLineSourceLoc.h7
-rw-r--r--include/clang/Frontend/CompilerInstance.h24
-rw-r--r--include/clang/Frontend/FrontendAction.h19
-rw-r--r--include/clang/Frontend/FrontendActions.h24
-rw-r--r--include/clang/Frontend/FrontendOptions.h2
-rw-r--r--include/clang/Frontend/HeaderSearchOptions.h6
-rw-r--r--include/clang/Frontend/LangStandard.h3
-rw-r--r--include/clang/Frontend/LogDiagnosticPrinter.h4
-rw-r--r--include/clang/Frontend/PreprocessorOptions.h8
-rw-r--r--include/clang/Frontend/Utils.h4
11 files changed, 66 insertions, 63 deletions
diff --git a/include/clang/Frontend/ASTUnit.h b/include/clang/Frontend/ASTUnit.h
index 9fb552131f..17e91ed720 100644
--- a/include/clang/Frontend/ASTUnit.h
+++ b/include/clang/Frontend/ASTUnit.h
@@ -145,11 +145,11 @@ private:
ASTLocation LastLoc;
/// \brief The set of diagnostics produced when creating the preamble.
- llvm::SmallVector<StoredDiagnostic, 4> PreambleDiagnostics;
+ SmallVector<StoredDiagnostic, 4> PreambleDiagnostics;
/// \brief The set of diagnostics produced when creating this
/// translation unit.
- llvm::SmallVector<StoredDiagnostic, 4> StoredDiagnostics;
+ SmallVector<StoredDiagnostic, 4> StoredDiagnostics;
/// \brief The number of stored diagnostics that come from the driver
/// itself.
@@ -160,7 +160,7 @@ private:
/// \brief Temporary files that should be removed when the ASTUnit is
/// destroyed.
- llvm::SmallVector<llvm::sys::Path, 4> TemporaryFiles;
+ SmallVector<llvm::sys::Path, 4> TemporaryFiles;
/// \brief A mapping from file IDs to the set of preprocessed entities
/// stored in that file.
@@ -253,10 +253,10 @@ private:
const char **ArgBegin, const char **ArgEnd,
ASTUnit &AST, bool CaptureDiagnostics);
- void TranslateStoredDiagnostics(ASTReader *MMan, llvm::StringRef ModName,
+ void TranslateStoredDiagnostics(ASTReader *MMan, StringRef ModName,
SourceManager &SrcMan,
- const llvm::SmallVectorImpl<StoredDiagnostic> &Diags,
- llvm::SmallVectorImpl<StoredDiagnostic> &Out);
+ const SmallVectorImpl<StoredDiagnostic> &Diags,
+ SmallVectorImpl<StoredDiagnostic> &Out);
public:
/// \brief A cached code-completion result, which may be introduced in one of
@@ -442,7 +442,7 @@ public:
ASTLocation getLastASTLocation() const { return LastLoc; }
- llvm::StringRef getMainFileName() const;
+ StringRef getMainFileName() const;
typedef std::vector<Decl *>::iterator top_level_iterator;
@@ -513,7 +513,7 @@ public:
}
unsigned stored_diag_size() const { return StoredDiagnostics.size(); }
- llvm::SmallVector<StoredDiagnostic, 4> &getStoredDiagnostics() {
+ SmallVector<StoredDiagnostic, 4> &getStoredDiagnostics() {
return StoredDiagnostics;
}
@@ -532,7 +532,7 @@ public:
return CachedCompletionResults.size();
}
- llvm::MemoryBuffer *getBufferForFile(llvm::StringRef Filename,
+ llvm::MemoryBuffer *getBufferForFile(StringRef Filename,
std::string *ErrorStr = 0);
/// \brief Whether this AST represents a complete translation unit.
@@ -632,7 +632,7 @@ public:
static ASTUnit *LoadFromCommandLine(const char **ArgBegin,
const char **ArgEnd,
llvm::IntrusiveRefCntPtr<Diagnostic> Diags,
- llvm::StringRef ResourceFilesPath,
+ StringRef ResourceFilesPath,
bool OnlyLocalDecls = false,
bool CaptureDiagnostics = false,
RemappedFile *RemappedFiles = 0,
@@ -670,19 +670,19 @@ public:
///
/// FIXME: The Diag, LangOpts, SourceMgr, FileMgr, StoredDiagnostics, and
/// OwnedBuffers parameters are all disgusting hacks. They will go away.
- void CodeComplete(llvm::StringRef File, unsigned Line, unsigned Column,
+ void CodeComplete(StringRef File, unsigned Line, unsigned Column,
RemappedFile *RemappedFiles, unsigned NumRemappedFiles,
bool IncludeMacros, bool IncludeCodePatterns,
CodeCompleteConsumer &Consumer,
Diagnostic &Diag, LangOptions &LangOpts,
SourceManager &SourceMgr, FileManager &FileMgr,
- llvm::SmallVectorImpl<StoredDiagnostic> &StoredDiagnostics,
- llvm::SmallVectorImpl<const llvm::MemoryBuffer *> &OwnedBuffers);
+ SmallVectorImpl<StoredDiagnostic> &StoredDiagnostics,
+ SmallVectorImpl<const llvm::MemoryBuffer *> &OwnedBuffers);
/// \brief Save this translation unit to a file with the given name.
///
/// \returns An indication of whether the save was successful or not.
- CXSaveError Save(llvm::StringRef File);
+ CXSaveError Save(StringRef File);
/// \brief Serialize this translation unit with the given output stream.
///
diff --git a/include/clang/Frontend/CommandLineSourceLoc.h b/include/clang/Frontend/CommandLineSourceLoc.h
index 8911cfadd5..c01f91d6ec 100644
--- a/include/clang/Frontend/CommandLineSourceLoc.h
+++ b/include/clang/Frontend/CommandLineSourceLoc.h
@@ -15,6 +15,7 @@
#ifndef LLVM_CLANG_FRONTEND_COMMANDLINESOURCELOC_H
#define LLVM_CLANG_FRONTEND_COMMANDLINESOURCELOC_H
+#include "clang/Basic/LLVM.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/raw_ostream.h"
@@ -29,10 +30,10 @@ struct ParsedSourceLocation {
public:
/// Construct a parsed source location from a string; the Filename is empty on
/// error.
- static ParsedSourceLocation FromString(llvm::StringRef Str) {
+ static ParsedSourceLocation FromString(StringRef Str) {
ParsedSourceLocation PSL;
- std::pair<llvm::StringRef, llvm::StringRef> ColSplit = Str.rsplit(':');
- std::pair<llvm::StringRef, llvm::StringRef> LineSplit =
+ std::pair<StringRef, StringRef> ColSplit = Str.rsplit(':');
+ std::pair<StringRef, StringRef> LineSplit =
ColSplit.first.rsplit(':');
// If both tail splits were valid integers, return success.
diff --git a/include/clang/Frontend/CompilerInstance.h b/include/clang/Frontend/CompilerInstance.h
index b2c877ac40..75c2bf2f14 100644
--- a/include/clang/Frontend/CompilerInstance.h
+++ b/include/clang/Frontend/CompilerInstance.h
@@ -518,7 +518,7 @@ public:
/// Create an external AST source to read a PCH file and attach it to the AST
/// context.
- void createPCHExternalASTSource(llvm::StringRef Path,
+ void createPCHExternalASTSource(StringRef Path,
bool DisablePCHValidation,
bool DisableStatCache,
void *DeserializationListener);
@@ -527,7 +527,7 @@ public:
///
/// \return - The new object on success, or null on failure.
static ExternalASTSource *
- createPCHExternalASTSource(llvm::StringRef Path, const std::string &Sysroot,
+ createPCHExternalASTSource(StringRef Path, const std::string &Sysroot,
bool DisablePCHValidation,
bool DisableStatCache,
Preprocessor &PP, ASTContext &Context,
@@ -560,18 +560,18 @@ public:
///
/// \return - Null on error.
llvm::raw_fd_ostream *
- createDefaultOutputFile(bool Binary = true, llvm::StringRef BaseInput = "",
- llvm::StringRef Extension = "");
+ createDefaultOutputFile(bool Binary = true, StringRef BaseInput = "",
+ StringRef Extension = "");
/// Create a new output file and add it to the list of tracked output files,
/// optionally deriving the output path name.
///
/// \return - Null on error.
llvm::raw_fd_ostream *
- createOutputFile(llvm::StringRef OutputPath,
+ createOutputFile(StringRef OutputPath,
bool Binary = true, bool RemoveFileOnSignal = true,
- llvm::StringRef BaseInput = "",
- llvm::StringRef Extension = "");
+ StringRef BaseInput = "",
+ StringRef Extension = "");
/// Create a new output file, optionally deriving the output path name.
///
@@ -594,10 +594,10 @@ public:
/// \param TempPathName [out] - If given, the temporary file path name
/// will be stored here on success.
static llvm::raw_fd_ostream *
- createOutputFile(llvm::StringRef OutputPath, std::string &Error,
+ createOutputFile(StringRef OutputPath, std::string &Error,
bool Binary = true, bool RemoveFileOnSignal = true,
- llvm::StringRef BaseInput = "",
- llvm::StringRef Extension = "",
+ StringRef BaseInput = "",
+ StringRef Extension = "",
std::string *ResultPathName = 0,
std::string *TempPathName = 0);
@@ -609,13 +609,13 @@ public:
/// as the main file.
///
/// \return True on success.
- bool InitializeSourceManager(llvm::StringRef InputFile);
+ bool InitializeSourceManager(StringRef InputFile);
/// InitializeSourceManager - Initialize the source manager to set InputFile
/// as the main file.
///
/// \return True on success.
- static bool InitializeSourceManager(llvm::StringRef InputFile,
+ static bool InitializeSourceManager(StringRef InputFile,
Diagnostic &Diags,
FileManager &FileMgr,
SourceManager &SourceMgr,
diff --git a/include/clang/Frontend/FrontendAction.h b/include/clang/Frontend/FrontendAction.h
index f335475665..cd6dfa2d35 100644
--- a/include/clang/Frontend/FrontendAction.h
+++ b/include/clang/Frontend/FrontendAction.h
@@ -10,6 +10,7 @@
#ifndef LLVM_CLANG_FRONTEND_FRONTENDACTION_H
#define LLVM_CLANG_FRONTEND_FRONTENDACTION_H
+#include "clang/Basic/LLVM.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/OwningPtr.h"
#include <string>
@@ -55,7 +56,7 @@ class FrontendAction {
private:
ASTConsumer* CreateWrappedASTConsumer(CompilerInstance &CI,
- llvm::StringRef InFile);
+ StringRef InFile);
protected:
/// @name Implementation Action Interface
@@ -76,7 +77,7 @@ protected:
///
/// \return The new AST consumer, or 0 on failure.
virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
- llvm::StringRef InFile) = 0;
+ StringRef InFile) = 0;
/// \brief Callback before starting processing a single input, giving the
/// opportunity to modify the CompilerInvocation or do some other action
@@ -92,7 +93,7 @@ protected:
/// \return True on success; on failure \see ExecutionAction() and
/// EndSourceFileAction() will not be called.
virtual bool BeginSourceFileAction(CompilerInstance &CI,
- llvm::StringRef Filename) {
+ StringRef Filename) {
return true;
}
@@ -152,7 +153,7 @@ public:
return CurrentASTUnit.take();
}
- void setCurrentFile(llvm::StringRef Value, InputKind Kind, ASTUnit *AST = 0);
+ void setCurrentFile(StringRef Value, InputKind Kind, ASTUnit *AST = 0);
/// @}
/// @name Supported Modes
@@ -205,7 +206,7 @@ public:
///
/// \return True on success; the compilation of this file should be aborted
/// and neither Execute nor EndSourceFile should be called.
- bool BeginSourceFile(CompilerInstance &CI, llvm::StringRef Filename,
+ bool BeginSourceFile(CompilerInstance &CI, StringRef Filename,
InputKind Kind);
/// Execute - Set the source managers main input file, and run the action.
@@ -236,7 +237,7 @@ public:
class PluginASTAction : public ASTFrontendAction {
protected:
virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
- llvm::StringRef InFile) = 0;
+ StringRef InFile) = 0;
public:
/// ParseArgs - Parse the given plugin command line arguments.
@@ -256,7 +257,7 @@ protected:
/// CreateASTConsumer - Provide a default implementation which returns aborts,
/// this method should never be called by FrontendAction clients.
virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
- llvm::StringRef InFile);
+ StringRef InFile);
public:
virtual bool usesPreprocessorOnly() const { return true; }
@@ -272,10 +273,10 @@ class WrapperFrontendAction : public FrontendAction {
protected:
virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
- llvm::StringRef InFile);
+ StringRef InFile);
virtual bool BeginInvocation(CompilerInstance &CI);
virtual bool BeginSourceFileAction(CompilerInstance &CI,
- llvm::StringRef Filename);
+ StringRef Filename);
virtual void ExecuteAction();
virtual void EndSourceFileAction();
diff --git a/include/clang/Frontend/FrontendActions.h b/include/clang/Frontend/FrontendActions.h
index b409ad1e09..9f9476a927 100644
--- a/include/clang/Frontend/FrontendActions.h
+++ b/include/clang/Frontend/FrontendActions.h
@@ -24,7 +24,7 @@ class InitOnlyAction : public FrontendAction {
virtual void ExecuteAction();
virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
- llvm::StringRef InFile);
+ StringRef InFile);
public:
// Don't claim to only use the preprocessor, we want to follow the AST path,
@@ -39,37 +39,37 @@ public:
class ASTPrintAction : public ASTFrontendAction {
protected:
virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
- llvm::StringRef InFile);
+ StringRef InFile);
};
class ASTDumpAction : public ASTFrontendAction {
protected:
virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
- llvm::StringRef InFile);
+ StringRef InFile);
};
class ASTDumpXMLAction : public ASTFrontendAction {
protected:
virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
- llvm::StringRef InFile);
+ StringRef InFile);
};
class ASTViewAction : public ASTFrontendAction {
protected:
virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
- llvm::StringRef InFile);
+ StringRef InFile);
};
class DeclContextPrintAction : public ASTFrontendAction {
protected:
virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
- llvm::StringRef InFile);
+ StringRef InFile);
};
class GeneratePCHAction : public ASTFrontendAction {
protected:
virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
- llvm::StringRef InFile);
+ StringRef InFile);
virtual bool usesCompleteTranslationUnit() { return false; }
@@ -81,7 +81,7 @@ public:
///
/// \returns true if an error occurred, false otherwise.
static bool ComputeASTConsumerArguments(CompilerInstance &CI,
- llvm::StringRef InFile,
+ StringRef InFile,
std::string &Sysroot,
std::string &OutputFile,
llvm::raw_ostream *&OS,
@@ -91,7 +91,7 @@ public:
class SyntaxOnlyAction : public ASTFrontendAction {
protected:
virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
- llvm::StringRef InFile);
+ StringRef InFile);
public:
virtual bool hasCodeCompletionSupport() const { return true; }
@@ -114,10 +114,10 @@ class ASTMergeAction : public FrontendAction {
protected:
virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
- llvm::StringRef InFile);
+ StringRef InFile);
virtual bool BeginSourceFileAction(CompilerInstance &CI,
- llvm::StringRef Filename);
+ StringRef Filename);
virtual void ExecuteAction();
virtual void EndSourceFileAction();
@@ -137,7 +137,7 @@ public:
class PrintPreambleAction : public FrontendAction {
protected:
void ExecuteAction();
- virtual ASTConsumer *CreateASTConsumer(CompilerInstance &, llvm::StringRef) {
+ virtual ASTConsumer *CreateASTConsumer(CompilerInstance &, StringRef) {
return 0;
}
diff --git a/include/clang/Frontend/FrontendOptions.h b/include/clang/Frontend/FrontendOptions.h
index c51ed6076a..e7c2ac4002 100644
--- a/include/clang/Frontend/FrontendOptions.h
+++ b/include/clang/Frontend/FrontendOptions.h
@@ -151,7 +151,7 @@ public:
///
/// \return The input kind for the extension, or IK_None if the extension is
/// not recognized.
- static InputKind getInputKindForExtension(llvm::StringRef Extension);
+ static InputKind getInputKindForExtension(StringRef Extension);
};
} // end namespace clang
diff --git a/include/clang/Frontend/HeaderSearchOptions.h b/include/clang/Frontend/HeaderSearchOptions.h
index 0347f98fd5..949dfe1195 100644
--- a/include/clang/Frontend/HeaderSearchOptions.h
+++ b/include/clang/Frontend/HeaderSearchOptions.h
@@ -44,7 +44,7 @@ public:
/// path.
unsigned IgnoreSysRoot : 1;
- Entry(llvm::StringRef path, frontend::IncludeDirGroup group,
+ Entry(StringRef path, frontend::IncludeDirGroup group,
bool isUserSupplied, bool isFramework, bool ignoreSysRoot)
: Path(path), Group(group), IsUserSupplied(isUserSupplied),
IsFramework(isFramework), IgnoreSysRoot(ignoreSysRoot) {}
@@ -89,13 +89,13 @@ public:
unsigned Verbose : 1;
public:
- HeaderSearchOptions(llvm::StringRef _Sysroot = "/")
+ HeaderSearchOptions(StringRef _Sysroot = "/")
: Sysroot(_Sysroot), UseBuiltinIncludes(true),
UseStandardIncludes(true), UseStandardCXXIncludes(true), UseLibcxx(false),
Verbose(false) {}
/// AddPath - Add the \arg Path path to the specified \arg Group list.
- void AddPath(llvm::StringRef Path, frontend::IncludeDirGroup Group,
+ void AddPath(StringRef Path, frontend::IncludeDirGroup Group,
bool IsUserSupplied, bool IsFramework, bool IgnoreSysRoot) {
UserEntries.push_back(Entry(Path, Group, IsUserSupplied, IsFramework,
IgnoreSysRoot));
diff --git a/include/clang/Frontend/LangStandard.h b/include/clang/Frontend/LangStandard.h
index ea37bdd102..de2800cd73 100644
--- a/include/clang/Frontend/LangStandard.h
+++ b/include/clang/Frontend/LangStandard.h
@@ -10,6 +10,7 @@
#ifndef LLVM_CLANG_FRONTEND_LANGSTANDARD_H
#define LLVM_CLANG_FRONTEND_LANGSTANDARD_H
+#include "clang/Basic/LLVM.h"
#include "llvm/ADT/StringRef.h"
namespace clang {
@@ -83,7 +84,7 @@ public:
bool hasImplicitInt() const { return Flags & frontend::ImplicitInt; }
static const LangStandard &getLangStandardForKind(Kind K);
- static const LangStandard *getLangStandardForName(llvm::StringRef Name);
+ static const LangStandard *getLangStandardForName(StringRef Name);
};
} // end namespace clang
diff --git a/include/clang/Frontend/LogDiagnosticPrinter.h b/include/clang/Frontend/LogDiagnosticPrinter.h
index b6fc23ca1f..fbed15b741 100644
--- a/include/clang/Frontend/LogDiagnosticPrinter.h
+++ b/include/clang/Frontend/LogDiagnosticPrinter.h
@@ -48,7 +48,7 @@ class LogDiagnosticPrinter : public DiagnosticClient {
FullSourceLoc LastLoc;
unsigned OwnsOutputStream : 1;
- llvm::SmallVector<DiagEntry, 8> Entries;
+ SmallVector<DiagEntry, 8> Entries;
std::string MainFilename;
std::string DwarfDebugFlags;
@@ -58,7 +58,7 @@ public:
bool OwnsOutputStream = false);
virtual ~LogDiagnosticPrinter();
- void setDwarfDebugFlags(llvm::StringRef Value) {
+ void setDwarfDebugFlags(StringRef Value) {
DwarfDebugFlags = Value;
}
diff --git a/include/clang/Frontend/PreprocessorOptions.h b/include/clang/Frontend/PreprocessorOptions.h
index 2e16c97e7d..f461e9ea07 100644
--- a/include/clang/Frontend/PreprocessorOptions.h
+++ b/include/clang/Frontend/PreprocessorOptions.h
@@ -162,13 +162,13 @@ public:
RetainRemappedFileBuffers(false),
ObjCXXARCStandardLibrary(ARCXX_nolib) { }
- void addMacroDef(llvm::StringRef Name) {
+ void addMacroDef(StringRef Name) {
Macros.push_back(std::make_pair(Name, false));
}
- void addMacroUndef(llvm::StringRef Name) {
+ void addMacroUndef(StringRef Name) {
Macros.push_back(std::make_pair(Name, true));
}
- void addRemappedFile(llvm::StringRef From, llvm::StringRef To) {
+ void addRemappedFile(StringRef From, StringRef To) {
RemappedFiles.push_back(std::make_pair(From, To));
}
@@ -176,7 +176,7 @@ public:
return RemappedFiles.erase(Remapped);
}
- void addRemappedFile(llvm::StringRef From, const llvm::MemoryBuffer * To) {
+ void addRemappedFile(StringRef From, const llvm::MemoryBuffer * To) {
RemappedFileBuffers.push_back(std::make_pair(From, To));
}
diff --git a/include/clang/Frontend/Utils.h b/include/clang/Frontend/Utils.h
index 93d2c7d501..7cf705b213 100644
--- a/include/clang/Frontend/Utils.h
+++ b/include/clang/Frontend/Utils.h
@@ -48,7 +48,7 @@ class FrontendOptions;
/// Normalize \arg File for use in a user defined #include directive (in the
/// predefines buffer).
-std::string NormalizeDashIncludePath(llvm::StringRef File,
+std::string NormalizeDashIncludePath(StringRef File,
FileManager &FileMgr);
/// Apply the header search options to get given HeaderSearch object.
@@ -87,7 +87,7 @@ void AttachDependencyFileGen(Preprocessor &PP,
/// \param OutputPath - If non-empty, a path to write the header include
/// information to, instead of writing to stderr.
void AttachHeaderIncludeGen(Preprocessor &PP, bool ShowAllHeaders = false,
- llvm::StringRef OutputPath = "",
+ StringRef OutputPath = "",
bool ShowDepth = true);
/// CacheTokens - Cache tokens for use with PCH. Note that this requires