Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
c6bfe050
Commit
c6bfe050
authored
Sep 03, 2010
by
Roberto Raggi
Browse files
Fixed alignment issues with 64 bits ABIs.
parent
8d55ce4c
Changes
14
Hide whitespace changes
Inline
Side-by-side
src/shared/cplusplus/Bind.cpp
View file @
c6bfe050
...
...
@@ -626,7 +626,7 @@ bool Bind::visit(OperatorAST *ast)
return
false
;
}
in
t
Bind
::
cppOperator
(
OperatorAST
*
ast
)
OperatorNameId
::
K
in
d
Bind
::
cppOperator
(
OperatorAST
*
ast
)
{
OperatorNameId
::
Kind
kind
=
OperatorNameId
::
InvalidOp
;
...
...
@@ -2423,7 +2423,7 @@ bool Bind::visit(QualifiedNameAST *ast)
bool
Bind
::
visit
(
OperatorFunctionIdAST
*
ast
)
{
const
in
t
op
=
this
->
cppOperator
(
ast
->
op
);
const
OperatorNameId
::
K
in
d
op
=
this
->
cppOperator
(
ast
->
op
);
ast
->
name
=
_name
=
control
()
->
operatorNameId
(
op
);
return
false
;
}
...
...
src/shared/cplusplus/Bind.h
View file @
c6bfe050
...
...
@@ -51,6 +51,7 @@
#include
"ASTVisitor.h"
#include
"FullySpecifiedType.h"
#include
"Names.h"
namespace
CPlusPlus
{
...
...
@@ -117,7 +118,7 @@ protected:
FullySpecifiedType
newArrayDeclarator
(
NewArrayDeclaratorAST
*
ast
,
const
FullySpecifiedType
&
init
);
void
newInitializer
(
NewInitializerAST
*
ast
);
FullySpecifiedType
newTypeId
(
NewTypeIdAST
*
ast
);
in
t
cppOperator
(
OperatorAST
*
ast
);
OperatorNameId
::
K
in
d
cppOperator
(
OperatorAST
*
ast
);
void
parameterDeclarationClause
(
ParameterDeclarationClauseAST
*
ast
,
unsigned
lparen_token
,
Function
*
fun
);
void
translationUnit
(
TranslationUnitAST
*
ast
);
void
objCProtocolRefs
(
ObjCProtocolRefsAST
*
ast
,
Symbol
*
objcClassOrProtocol
);
...
...
src/shared/cplusplus/Control.cpp
View file @
c6bfe050
...
...
@@ -259,7 +259,7 @@ public:
return
destructorNameIds
.
intern
(
DestructorNameId
(
id
));
}
const
OperatorNameId
*
findOrInsertOperatorNameId
(
in
t
kind
)
const
OperatorNameId
*
findOrInsertOperatorNameId
(
OperatorNameId
::
K
in
d
kind
)
{
return
operatorNameIds
.
intern
(
OperatorNameId
(
kind
));
}
...
...
@@ -609,7 +609,7 @@ const TemplateNameId *Control::templateNameId(const Identifier *id,
const
DestructorNameId
*
Control
::
destructorNameId
(
const
Identifier
*
id
)
{
return
d
->
findOrInsertDestructorNameId
(
id
);
}
const
OperatorNameId
*
Control
::
operatorNameId
(
in
t
kind
)
const
OperatorNameId
*
Control
::
operatorNameId
(
OperatorNameId
::
K
in
d
kind
)
{
return
d
->
findOrInsertOperatorNameId
(
kind
);
}
const
ConversionNameId
*
Control
::
conversionNameId
(
const
FullySpecifiedType
&
type
)
...
...
src/shared/cplusplus/Control.h
View file @
c6bfe050
...
...
@@ -50,6 +50,7 @@
#define CPLUSPLUS_CONTROL_H
#include
"CPlusPlusForwardDeclarations.h"
#include
"Names.h"
namespace
CPlusPlus
{
...
...
@@ -74,7 +75,7 @@ public:
const
DestructorNameId
*
destructorNameId
(
const
Identifier
*
id
);
/// Returns the canonical operator name id.
const
OperatorNameId
*
operatorNameId
(
in
t
operatorId
);
const
OperatorNameId
*
operatorNameId
(
OperatorNameId
::
K
in
d
operatorId
);
/// Returns the canonical conversion name id.
const
ConversionNameId
*
conversionNameId
(
const
FullySpecifiedType
&
type
);
...
...
src/shared/cplusplus/Literals.cpp
View file @
c6bfe050
...
...
@@ -56,7 +56,7 @@ using namespace CPlusPlus;
////////////////////////////////////////////////////////////////////////////////
Literal
::
Literal
(
const
char
*
chars
,
unsigned
size
)
:
_
ind
ex
(
0
),
_
n
ex
t
(
0
)
:
_
n
ex
t
(
0
),
_
ind
ex
(
0
)
{
_chars
=
new
char
[
size
+
1
];
...
...
src/shared/cplusplus/Literals.h
View file @
c6bfe050
...
...
@@ -80,15 +80,15 @@ public:
bool
equalTo
(
const
Literal
*
other
)
const
;
Literal
*
_next
;
// ## private
private:
char
*
_chars
;
unsigned
_size
;
unsigned
_hashCode
;
public:
// ### private
unsigned
_index
;
Literal
*
_next
;
unsigned
_index
;
// ### private
};
class
CPLUSPLUS_EXPORT
StringLiteral
:
public
Literal
...
...
src/shared/cplusplus/Names.cpp
View file @
c6bfe050
...
...
@@ -153,7 +153,7 @@ bool TemplateNameId::isEqualTo(const Name *other) const
return
true
;
}
OperatorNameId
::
OperatorNameId
(
in
t
kind
)
OperatorNameId
::
OperatorNameId
(
K
in
d
kind
)
:
_kind
(
kind
)
{
}
...
...
@@ -163,7 +163,7 @@ OperatorNameId::~OperatorNameId()
void
OperatorNameId
::
accept0
(
NameVisitor
*
visitor
)
const
{
visitor
->
visit
(
this
);
}
in
t
OperatorNameId
::
kind
()
const
OperatorNameId
::
K
in
d
OperatorNameId
::
kind
()
const
{
return
_kind
;
}
const
Identifier
*
OperatorNameId
::
identifier
()
const
...
...
src/shared/cplusplus/Names.h
View file @
c6bfe050
...
...
@@ -193,10 +193,10 @@ public:
};
public:
OperatorNameId
(
in
t
kind
);
OperatorNameId
(
K
in
d
kind
);
virtual
~
OperatorNameId
();
in
t
kind
()
const
;
K
in
d
kind
()
const
;
virtual
const
Identifier
*
identifier
()
const
;
virtual
bool
isEqualTo
(
const
Name
*
other
)
const
;
...
...
@@ -208,7 +208,7 @@ protected:
virtual
void
accept0
(
NameVisitor
*
visitor
)
const
;
private:
in
t
_kind
;
K
in
d
_kind
;
};
class
CPLUSPLUS_EXPORT
ConversionNameId
:
public
Name
...
...
src/shared/cplusplus/Scope.cpp
View file @
c6bfe050
...
...
@@ -95,7 +95,7 @@ public:
iterator
lastSymbol
()
const
;
Symbol
*
lookat
(
const
Identifier
*
id
)
const
;
Symbol
*
lookat
(
in
t
operatorId
)
const
;
Symbol
*
lookat
(
OperatorNameId
::
K
in
d
operatorId
)
const
;
private:
/// Returns the hash value for the given Symbol.
...
...
@@ -186,7 +186,7 @@ Symbol *SymbolTable::lookat(const Identifier *id) const
return
symbol
;
}
Symbol
*
SymbolTable
::
lookat
(
in
t
operatorId
)
const
Symbol
*
SymbolTable
::
lookat
(
OperatorNameId
::
K
in
d
operatorId
)
const
{
if
(
!
_hash
)
return
0
;
...
...
@@ -290,7 +290,7 @@ Scope::iterator Scope::lastMember() const
Symbol
*
Scope
::
find
(
const
Identifier
*
id
)
const
{
return
_members
?
_members
->
lookat
(
id
)
:
0
;
}
Symbol
*
Scope
::
find
(
in
t
operatorId
)
const
Symbol
*
Scope
::
find
(
OperatorNameId
::
K
in
d
operatorId
)
const
{
return
_members
?
_members
->
lookat
(
operatorId
)
:
0
;
}
/// Set the start offset of the scope
...
...
src/shared/cplusplus/Scope.h
View file @
c6bfe050
...
...
@@ -51,6 +51,7 @@
#include
"CPlusPlusForwardDeclarations.h"
#include
"Symbol.h"
#include
"Names.h"
namespace
CPlusPlus
{
...
...
@@ -81,7 +82,7 @@ public:
iterator
lastMember
()
const
;
Symbol
*
find
(
const
Identifier
*
id
)
const
;
Symbol
*
find
(
in
t
operatorId
)
const
;
Symbol
*
find
(
OperatorNameId
::
K
in
d
operatorId
)
const
;
/// Set the start offset of the scope
unsigned
startOffset
()
const
;
...
...
src/shared/cplusplus/Symbol.cpp
View file @
c6bfe050
...
...
@@ -112,12 +112,16 @@ private:
Symbol
::
Symbol
(
TranslationUnit
*
translationUnit
,
unsigned
sourceLocation
,
const
Name
*
name
)
:
_name
(
0
),
_scope
(
0
),
_next
(
0
),
_fileId
(
0
),
_sourceLocation
(
0
),
_hashCode
(
0
),
_storage
(
Symbol
::
NoStorage
),
_visibility
(
Symbol
::
Public
),
_scope
(
0
),
_index
(
0
),
_next
(
0
),
_line
(
0
),
_column
(
0
),
_isGenerated
(
false
),
_isDeprecated
(
false
),
_isUnavailable
(
false
)
...
...
src/shared/cplusplus/Symbol.h
View file @
c6bfe050
...
...
@@ -319,15 +319,15 @@ protected:
virtual
void
visitSymbol0
(
SymbolVisitor
*
visitor
)
=
0
;
private:
unsigned
_sourceLocation
;
const
Name
*
_name
;
Scope
*
_scope
;
Symbol
*
_next
;
const
StringLiteral
*
_fileId
;
unsigned
_sourceLocation
;
unsigned
_hashCode
;
int
_storage
;
int
_visibility
;
Scope
*
_scope
;
unsigned
_index
;
Symbol
*
_next
;
const
StringLiteral
*
_fileId
;
unsigned
_line
;
unsigned
_column
;
...
...
src/shared/cplusplus/Symbols.cpp
View file @
c6bfe050
...
...
@@ -681,10 +681,10 @@ void ObjCBaseProtocol::visitSymbol0(SymbolVisitor *visitor)
{
visitor
->
visit
(
this
);
}
ObjCClass
::
ObjCClass
(
TranslationUnit
*
translationUnit
,
unsigned
sourceLocation
,
const
Name
*
name
)
:
Scope
(
translationUnit
,
sourceLocation
,
name
),
_
isInterface
(
false
),
_
categoryName
(
0
),
_
baseClass
(
0
)
Scope
(
translationUnit
,
sourceLocation
,
name
),
_
categoryName
(
0
),
_
baseClass
(
0
),
_
isInterface
(
false
)
{
}
...
...
@@ -992,9 +992,9 @@ ObjCPropertyDeclaration::ObjCPropertyDeclaration(TranslationUnit *translationUni
unsigned
sourceLocation
,
const
Name
*
name
)
:
Symbol
(
translationUnit
,
sourceLocation
,
name
),
_propertyAttributes
(
None
),
_getterName
(
0
),
_setterName
(
0
)
_setterName
(
0
),
_propertyAttributes
(
None
)
{}
ObjCPropertyDeclaration
::~
ObjCPropertyDeclaration
()
...
...
src/shared/cplusplus/Symbols.h
View file @
c6bfe050
...
...
@@ -171,8 +171,8 @@ protected:
virtual
void
visitSymbol0
(
SymbolVisitor
*
visitor
);
private:
FullySpecifiedType
_type
;
const
StringLiteral
*
_initializer
;
FullySpecifiedType
_type
;
};
class
CPLUSPLUS_EXPORT
TypenameArgument
:
public
Symbol
...
...
@@ -531,8 +531,6 @@ public:
protected:
virtual
void
visitSymbol0
(
SymbolVisitor
*
visitor
);
private:
};
class
CPLUSPLUS_EXPORT
ObjCBaseProtocol
:
public
Symbol
...
...
@@ -552,8 +550,6 @@ public:
protected:
virtual
void
visitSymbol0
(
SymbolVisitor
*
visitor
);
private:
};
class
CPLUSPLUS_EXPORT
ObjCForwardProtocolDeclaration
:
public
Symbol
,
public
Type
...
...
@@ -647,8 +643,6 @@ protected:
virtual
void
visitSymbol0
(
SymbolVisitor
*
visitor
);
virtual
void
accept0
(
TypeVisitor
*
visitor
);
virtual
bool
matchType0
(
const
Type
*
otherType
,
TypeMatcher
*
matcher
)
const
;
private:
};
class
CPLUSPLUS_EXPORT
ObjCClass
:
public
Scope
,
public
Type
...
...
@@ -695,10 +689,10 @@ protected:
virtual
bool
matchType0
(
const
Type
*
otherType
,
TypeMatcher
*
matcher
)
const
;
private:
bool
_isInterface
;
const
Name
*
_categoryName
;
ObjCBaseClass
*
_baseClass
;
std
::
vector
<
ObjCBaseProtocol
*>
_protocols
;
bool
_isInterface
;
};
class
CPLUSPLUS_EXPORT
ObjCMethod
:
public
Scope
,
public
Type
...
...
@@ -808,10 +802,10 @@ protected:
virtual
void
visitSymbol0
(
SymbolVisitor
*
visitor
);
private:
FullySpecifiedType
_type
;
int
_propertyAttributes
;
const
Name
*
_getterName
;
const
Name
*
_setterName
;
FullySpecifiedType
_type
;
int
_propertyAttributes
;
};
}
// end of namespace CPlusPlus
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment