summaryrefslogtreecommitdiffhomepage
path: root/CompilerDriver/cc.cc
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-04 15:26:59 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-04 15:26:59 +0100
commit60271b79a91a06772241aed737426f5d097ca533 (patch)
tree62d5d5407beb877dc6b3d2177b2a9ee4f9fe7c8c /CompilerDriver/cc.cc
parent6171a0adfacdc5834f2fc2a9d885ba3ef3cc15d8 (diff)
mpcc: add support for .cc
ld: abort when an unknown flag is found. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'CompilerDriver/cc.cc')
-rw-r--r--CompilerDriver/cc.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/CompilerDriver/cc.cc b/CompilerDriver/cc.cc
index 7d34875..4135be0 100644
--- a/CompilerDriver/cc.cc
+++ b/CompilerDriver/cc.cc
@@ -50,6 +50,12 @@ namespace detail
std::string fRegister;
};
+ struct CompilerClass
+ {
+ CompilerRegisterMap fRootRegister;
+ std::vector<CompilerRegisterMap> fRegisters;
+ };
+
struct CompilerState
{
std::vector<ParserKit::SyntaxLeafList> fSyntaxTreeList;
@@ -652,6 +658,7 @@ bool CompilerBackendClang::Compile(const std::string& text, const char* file)
_text.find("struct") == std::string::npos &&
_text.find("extern") == std::string::npos &&
_text.find("union") == std::string::npos &&
+ _text.find("class") == std::string::npos &&
_text.find("typedef") == std::string::npos)
substr += "__export .data ";
}