From: Mark Lobodzinski Date: Mon, 8 Jan 2018 16:00:56 +0000 (-0700) Subject: scripts: Remove unused source_line_info.py X-Git-Tag: sdk-1.0.68.0~84 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=294697ec21f218082ea55a617b9eec0230309256;p=platform%2Fupstream%2FVulkan-LoaderAndValidationLayers.git scripts: Remove unused source_line_info.py Change-Id: I1e8db79c88749a9c60469f01838dd1c485061528 --- diff --git a/scripts/source_line_info.py b/scripts/source_line_info.py deleted file mode 100755 index 66fea08..0000000 --- a/scripts/source_line_info.py +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env python3 -# -# Copyright (c) 2015-2016 The Khronos Group Inc. -# Copyright (c) 2015-2016 Valve Corporation -# Copyright (c) 2015-2016 LunarG, Inc. -# Copyright (c) 2015-2016 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Author: Tobin Ehlis - -from inspect import currentframe, getframeinfo - -# This is a wrapper class for inspect module that returns a formatted line -# with details of the source file and line number of python code who called -# into this class. The result can them be added to codegen to simplify -# debug as it shows where code was generated from. -class sourcelineinfo(): - def __init__(self): - self.general_prefix = "// CODEGEN : " - self.file_prefix = "file " - self.line_prefix = "line #" - self.enabled = True - - def get(self): - if self.enabled: - frameinfo = getframeinfo(currentframe().f_back) - return "%s%s%s %s%s" % (self.general_prefix, self.file_prefix, frameinfo.filename, self.line_prefix, frameinfo.lineno) - return ""