summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-12-16 23:49:14 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-12-16 23:49:14 +0000
commit0d2b021de66106051a388d6e9945ab8d147085d8 (patch)
tree8557e903e92c4f77c552553277368d3281048295 /include
parentf2640be5dfc41d11ca28ad60ab5e45bf4db7e36e (diff)
Use std::unique_ptr. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255852 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/MC/MCContext.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/llvm/MC/MCContext.h b/include/llvm/MC/MCContext.h
index db2afa50b66..e5a9afd9968 100644
--- a/include/llvm/MC/MCContext.h
+++ b/include/llvm/MC/MCContext.h
@@ -113,7 +113,7 @@ namespace llvm {
/// directive is used or it is an error.
char *SecureLogFile;
/// The stream that gets written to for the .secure_log_unique directive.
- raw_ostream *SecureLog;
+ std::unique_ptr<raw_fd_ostream> SecureLog;
/// Boolean toggled when .secure_log_unique / .secure_log_reset is seen to
/// catch errors if .secure_log_unique appears twice without
/// .secure_log_reset appearing between them.
@@ -506,9 +506,11 @@ namespace llvm {
/// @}
char *getSecureLogFile() { return SecureLogFile; }
- raw_ostream *getSecureLog() { return SecureLog; }
+ raw_fd_ostream *getSecureLog() { return SecureLog.get(); }
bool getSecureLogUsed() { return SecureLogUsed; }
- void setSecureLog(raw_ostream *Value) { SecureLog = Value; }
+ void setSecureLog(std::unique_ptr<raw_fd_ostream> Value) {
+ SecureLog = std::move(Value);
+ }
void setSecureLogUsed(bool Value) { SecureLogUsed = Value; }
void *allocate(unsigned Size, unsigned Align = 8) {