aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-11-18 20:06:30 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-11-18 20:06:30 +0000
commit9313aac61d425f14fa0b82c3dfe1eb2c3626d38c (patch)
tree6bc26c0f20b0cfbe5f0e9b5890a44f32caf56454
parent0943168ac126b8047f30f6bd215fbe7db14d61ba (diff)
Copy the LangOptions in PrintingPolicy to avoid pointing to a LangOptions that is long gone.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119729 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/AST/PrettyPrinter.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/clang/AST/PrettyPrinter.h b/include/clang/AST/PrettyPrinter.h
index 70d65d35fe..a59c302ffc 100644
--- a/include/clang/AST/PrettyPrinter.h
+++ b/include/clang/AST/PrettyPrinter.h
@@ -14,6 +14,8 @@
#ifndef LLVM_CLANG_AST_PRETTY_PRINTER_H
#define LLVM_CLANG_AST_PRETTY_PRINTER_H
+#include "clang/Basic/LangOptions.h"
+
namespace llvm {
class raw_ostream;
}
@@ -44,7 +46,7 @@ struct PrintingPolicy {
unsigned Indentation : 8;
/// \brief What language we're printing.
- const LangOptions &LangOpts;
+ const LangOptions LangOpts;
/// \brief Whether we should suppress printing of the actual specifiers for
/// the given type or declaration.