/* Hold current location information and last location information, so the
datastructures are built lazily only when some instructions in given
place are needed. */
-location_t curr_location, last_location;
+static location_t curr_location, last_location;
static tree curr_block, last_block;
static int curr_rtl_loc = -1;
time locators are not initialized. */
if (curr_rtl_loc == -1)
return;
- if (location == last_location)
- return;
curr_location = location;
}
-/* Set current scope block. */
+/* Get current location. */
+location_t
+get_curr_insn_source_location (void)
+{
+ return curr_location;
+}
+
+/* Set current scope block. */
void
set_curr_insn_block (tree b)
{
curr_block = b;
}
+/* Get current scope block. */
+tree
+get_curr_insn_block (void)
+{
+ return curr_block;
+}
+
/* Return current insn locator. */
int
curr_insn_locator (void)
{
switch (GET_CODE (insn))
{
+ case DEBUG_INSN:
case INSN:
case CALL_INSN:
case JUMP_INSN: