Copy the LangOptions in PrintingPolicy to avoid pointing to a LangOptions that is long gone.

llvm-svn: 119729
This commit is contained in:
Argyrios Kyrtzidis 2010-11-18 20:06:30 +00:00
parent 12f3b3b44f
commit 4fadc5b20a
1 changed files with 3 additions and 1 deletions

View File

@ -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.