forked from bytecodealliance/wasmtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…9578) * Add a test * Log section-relative offsets of DIEs For easier correlation to llvm-dwarfdump's output. * Do not GC function declarations Declarations must be consistent across compilation units.
- Loading branch information
1 parent
185f7a8
commit a126152
Showing
8 changed files
with
102 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include "generic.h" | ||
|
||
int SomeClass::SatelliteFunction(int x) { | ||
x *= 2; | ||
return x; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// clang generic.cpp generic-satellite.cpp -o generic.wasm -g -target | ||
// wasm32-unknown-wasip1 | ||
// | ||
#include "generic.h" | ||
|
||
int SomeClass::MainDefinedFunction() { | ||
int x = HIDE_FROM_CHECKER(1); | ||
int y = SatelliteFunction(x); | ||
return x + y; | ||
} | ||
|
||
int TestClassDefinitionSpreadAcrossCompileUnits() { | ||
int result = SomeClass::MainDefinedFunction(); | ||
return result != 3 ? 1 : 0; | ||
} | ||
|
||
int main() { | ||
int exitCode = 0; | ||
exitCode += TestClassDefinitionSpreadAcrossCompileUnits(); | ||
return exitCode; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#define HIDE_FROM_CHECKER(x) x | ||
|
||
class SomeClass { | ||
public: | ||
static int MainDefinedFunction(); | ||
static int SatelliteFunction(int x); | ||
}; |
Binary file not shown.