summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2010-06-28 21:45:58 +0000
committerKevin Enderby <enderby@apple.com>2010-06-28 21:45:58 +0000
commitf187ac5a23213f85c3c1f0f80b3592295ee6441d (patch)
tree92f3b045852ec88f84ca3d461e6d871f0cfba079 /include
parent0dd3549edc91b50fba102a6b0473caf8d4cf6b70 (diff)
downloadllvm-f187ac5a23213f85c3c1f0f80b3592295ee6441d.tar.gz
llvm-f187ac5a23213f85c3c1f0f80b3592295ee6441d.tar.bz2
llvm-f187ac5a23213f85c3c1f0f80b3592295ee6441d.tar.xz
Added the darwin .secure_log_unique and .secure_log_reset directives.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107077 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/MC/MCContext.h22
-rw-r--r--include/llvm/MC/MCParser/AsmParser.h4
2 files changed, 26 insertions, 0 deletions
diff --git a/include/llvm/MC/MCContext.h b/include/llvm/MC/MCContext.h
index 03b5fb0c1f..a57b5bf745 100644
--- a/include/llvm/MC/MCContext.h
+++ b/include/llvm/MC/MCContext.h
@@ -14,6 +14,7 @@
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/Support/Allocator.h"
+#include "llvm/Support/raw_ostream.h"
namespace llvm {
class MCAsmInfo;
@@ -54,6 +55,17 @@ namespace llvm {
/// for the LocalLabelVal and adds it to the map if needed.
unsigned GetInstance(int64_t LocalLabelVal);
+ /// The file name of the log file from the enviromment variable
+ /// AS_SECURE_LOG_FILE. Which must be set before the .secure_log_unique
+ /// 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;
+ /// 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.
+ bool SecureLogUsed;
+
/// Allocator - Allocator object used for creating machine code objects.
///
/// We use a bump pointer allocator to avoid the need to track all allocated
@@ -127,6 +139,16 @@ namespace llvm {
/// @}
+ char *getSecureLogFile() { return SecureLogFile; }
+ raw_ostream *getSecureLog() { return SecureLog; }
+ bool getSecureLogUsed() { return SecureLogUsed; }
+ void setSecureLog(raw_ostream *Value) {
+ SecureLog = Value;
+ }
+ void setSecureLogUsed(bool Value) {
+ SecureLogUsed = Value;
+ }
+
void *Allocate(unsigned Size, unsigned Align = 8) {
return Allocator.Allocate(Size, Align);
}
diff --git a/include/llvm/MC/MCParser/AsmParser.h b/include/llvm/MC/MCParser/AsmParser.h
index e929fd101d..99b48bb8a4 100644
--- a/include/llvm/MC/MCParser/AsmParser.h
+++ b/include/llvm/MC/MCParser/AsmParser.h
@@ -143,6 +143,10 @@ private:
bool ParseDirectiveDarwinSubsectionsViaSymbols();
// Darwin specific .dump and .load
bool ParseDirectiveDarwinDumpOrLoad(SMLoc IDLoc, bool IsDump);
+ // Darwin specific .secure_log_unique
+ bool ParseDirectiveDarwinSecureLogUnique(SMLoc IDLoc);
+ // Darwin specific .secure_log_reset
+ bool ParseDirectiveDarwinSecureLogReset(SMLoc IDLoc);
bool ParseDirectiveAbort(); // ".abort"
bool ParseDirectiveInclude(); // ".include"