aboutsummaryrefslogtreecommitdiff
path: root/libphobos/libdruntime/gcc
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2021-09-24 10:49:13 +0200
committerIain Buclaw <ibuclaw@gdcproject.org>2021-09-30 15:07:19 +0200
commit0111153234120de7f87b050df78f0d9819ca4214 (patch)
tree410d42d4ef765829c978c1584becdb4fdff7efa0 /libphobos/libdruntime/gcc
parentefa5449a094d3887e124d400ff0410af2c745b2d (diff)
downloadgcc-0111153234120de7f87b050df78f0d9819ca4214.zip
gcc-0111153234120de7f87b050df78f0d9819ca4214.tar.gz
gcc-0111153234120de7f87b050df78f0d9819ca4214.tar.bz2
libphobos: Remove unused variables in gcc.backtrace.
The core.runtime module always overrides the default parameter value for constructor calls. MaxAlignment is not required because a class can be created on the stack with the `scope' keyword. libphobos/ChangeLog: * libdruntime/core/runtime.d (runModuleUnitTests): Use scope to new LibBacktrace on the stack. * libdruntime/gcc/backtrace.d (FIRSTFRAME): Remove. (LibBacktrace.MaxAlignment): Remove. (LibBacktrace.this): Remove default initialization of firstFrame. (UnwindBacktrace.this): Likewise.
Diffstat (limited to 'libphobos/libdruntime/gcc')
-rw-r--r--libphobos/libdruntime/gcc/backtrace.d24
1 files changed, 2 insertions, 22 deletions
diff --git a/libphobos/libdruntime/gcc/backtrace.d b/libphobos/libdruntime/gcc/backtrace.d
index 8f5582d..3c4d65f 100644
--- a/libphobos/libdruntime/gcc/backtrace.d
+++ b/libphobos/libdruntime/gcc/backtrace.d
@@ -24,24 +24,6 @@ module gcc.backtrace;
import gcc.libbacktrace;
-version (Posix)
-{
- // NOTE: The first 5 frames with the current implementation are
- // inside core.runtime and the object code, so eliminate
- // these for readability. The alternative would be to
- // exclude the first N frames that are in a list of
- // mangled function names.
- private enum FIRSTFRAME = 5;
-}
-else
-{
- // NOTE: On Windows, the number of frames to exclude is based on
- // whether the exception is user or system-generated, so
- // it may be necessary to exclude a list of function names
- // instead.
- private enum FIRSTFRAME = 0;
-}
-
// Max size per line of the traceback.
private enum MAX_BUFSIZE = 1536;
@@ -205,8 +187,6 @@ static if (BACKTRACE_SUPPORTED && !BACKTRACE_USES_MALLOC)
// FIXME: state is never freed as libbacktrace doesn't provide a free function...
public class LibBacktrace : Throwable.TraceInfo
{
- enum MaxAlignment = (void*).alignof;
-
static void initLibBacktrace()
{
if (!initialized)
@@ -216,7 +196,7 @@ static if (BACKTRACE_SUPPORTED && !BACKTRACE_USES_MALLOC)
}
}
- this(int firstFrame = FIRSTFRAME)
+ this(int firstFrame)
{
_firstFrame = firstFrame;
@@ -365,7 +345,7 @@ else
*/
public class UnwindBacktrace : Throwable.TraceInfo
{
- this(int firstFrame = FIRSTFRAME)
+ this(int firstFrame)
{
_firstFrame = firstFrame;
_callstack = getBacktrace();