Use Twine for error message inputs.

This commit is contained in:
Peter Johnson
2017-12-01 21:31:35 -08:00
parent ab137abab5
commit fe53dd2f28
6 changed files with 69 additions and 68 deletions

View File

@@ -12,6 +12,7 @@
#include <string>
#include <llvm/StringRef.h>
#include <llvm/Twine.h>
#ifdef _WIN32
#include <Windows.h>
@@ -46,8 +47,8 @@ class Error {
const ErrorBase* GetOriginatingObject() const;
double GetTimestamp() const;
void Clear();
void Set(Code code, llvm::StringRef contextMessage, llvm::StringRef filename,
llvm::StringRef function, int lineNumber,
void Set(Code code, const llvm::Twine& contextMessage,
llvm::StringRef filename, llvm::StringRef function, int lineNumber,
const ErrorBase* originatingObject);
private: